While XXE carps on and does not resolve XIncludes using the XPointer scheme, 
they are preserved and round-tripped, as far as I can see. That is, while you 
can't see and edit the resulting infoset in XXE, you can at least edit the 
XPointer expression.

I customized the DocBook XML V4.2 DTD to allow xi:include at appropriate 
places, and also included the EBNF customization. XXE appears to work with this 
without further costumization, even display EBNF productions in a very nice 
style :).

My only problem has been that XXE appear to have an internal declaration of the 
xi:include element similar to the first http://www.w3.org/2001/XInclude 
version, while I use the http://www.w3.org/2001/XInclude that is now a 
recommendation (per 20th December 2004).

If I want to be able to add xi:include elements in XXE, I must put an 'new' 
xi:include declaration in the internal subset of the document:

<!ELEMENT xi:include (xi:fallback?)>
<!ATTLIST xi:include
    xmlns:xi        CDATA       #FIXED    "http://www.w3.org/2001/XInclude";
    href            CDATA       #IMPLIED
    parse           (xml|text)  "xml"
    xpointer        CDATA       #IMPLIED
    encoding        CDATA       #IMPLIED
    accept          CDATA       #IMPLIED
    accept-language CDATA       #IMPLIED
>

Otherwise, XXE inserts xi:include elements based on the 'old' 
http://www.w3.org/2001/XInclude (see 
http://www.w3.org/TR/2002/CR-xinclude-20020917/):

<!ELEMENT xi:include (xi:fallback)>
<!ATTLIST xi:include
    xmlns:xi   CDATA       #FIXED    "http://www.w3.org/2001/XInclude";
    href       CDATA       #REQUIRED
    parse      (xml|text)  "xml"
    encoding   CDATA       #IMPLIED
>



kind regards
Peter Ring

> -----Original Message-----
> From: xmleditor-support-bounces at xmlmind.com
> [mailto:xmleditor-support-bounces at xmlmind.com]On Behalf Of Hussein
> Shafie
> Sent: 21. januar 2005 10:25
> To: Reiner Schlenker
> Cc: xmleditor-support at xmlmind.com
> Subject: Re: [XXE] XPath-Expressions with XInclude and XPointer
> 
> 
> Reiner Schlenker wrote:
> > is it possible in XXE to reuse fragments of XML-documents 
> by adressing them
> > with XPath-expressions in the Xpointer-statement? I have 
> tried, but get a
> > parsing-error. This would be extremely helpful to build up modular
> > documents.
> > 
> > Example:
> > 
> >>From the following section, only the <para>-elements with 
> the values 'a' and
> > 'c' in the id-attribute shall be referenced into a 
> <chapter>-Element.
> > 
> > 
> > -----
> > <section>
> >   <title>Title</title>
> > 
> >   <para id="a">Para 1</para>
> > 
> >   <para id="b">Para 2</para>
> > 
> >   <para id="c">Para 3</para>
> > </section>
> > 
> > 
> > ---------------
> > 
> > <chapter>
> >   <title>Chapter</title>
> >    <section>
> >     <xi:include href="Section.xml"
> > xmlns:xi="http://www.w3.org/2001/XInclude";
> >      xpointer(//pa...@id='a'] | //pa...@id='c'])/>
> >    </section>
> > </chapter>
> > 
> > --------------
> > 
> 
> No, this is not possible. XXE only supports the element() 
> scheme and not 
> the xpointer() scheme. Moreover, supporting the xpointer() 
> scheme is not 
> planned.
> 
>  
> --
> XMLmind XML Editor Support List
> xmleditor-support at xmlmind.com
> http://www.xmlmind.com/mailman/listinfo/xmleditor-support
> 

Reply via email to