[xslt] Re: <xi:include> has no namespace in external entity



>>>>> Daniel Veillard <veillard@redhat.com>:

> On Mon, Apr 07, 2003 at 09:20:51PM +0200, Steinar Bang wrote:
>> extsection.xml:7: warning: Namespace prefix xi is not defined
>> <programlisting><xi:include href="testfile1.txt" parse="text"/></programlisti

>   <programlisting><xi:include href="testfile1.txt" parse="text"
>                    xmlns:xi='http://www.w3.org/2001/XInclude'/></programlisting>

>   and this will be garanteed to work.

Ah, OK.  That should mean that a #FIXED xmlns:xi attribute on
<xi:include>, should do the trick as well?  ie. like this:

<!DOCTYPE article
  PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"; [

  <!ENTITY % local.para.char.mix
    "|xi:include" >
  <!ELEMENT xi:include EMPTY >
  <!ATTLIST xi:include
     xmlns:xi CDATA #FIXED 'http://www.w3.org/2001/XInclude'
     href CDATA #REQUIRED
     parse (xml|text) "xml"
     encoding CDATA #IMPLIED >
]>

And it does indeed work.

Thanx Daniel!




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]