No, "element(some_unique_id)" works fine with xsltproc --xinclude.

The problem is that xsltproc needs a <!DOCTYPE> to recognize what is an
ID attribute. That is, it needs a  <!DOCTYPE> in the master document
(e.g. the book) but also in all the module documents (e.g. the included
chapters).

Next version of XXE has been slightly modified to improve the
interchange of the modular documents it creates with other XML
applications. Here's an excerpt of the document describing what has been
changed:

---
  * Despite the fact that XXE exclusively uses standard mechanisms
    (XIncludes and, to a limited extent, references to external
    entities), naively creating modular documents may lead to
    interchange problems with third-party applications.

    We would like to avoid this kind of problems by all means, that
    why:

      1. We have changed the DocBook4 and XHTML document templates to
         make this interchange problem less likely to happen. (Note
         that there is no such problems with DITA and with documents
         conforming to schemas other than DTDs.)

      2. The tutorial now includes a section called "Creating
         modular documents which are highly interchangeable with other
         applications" which describes the problem and suggests best
         practices.
---


vidar.soerensen at kongsberg.com wrote:
> I'm using XXE to create modular docbook documents using Xinclude
> references to the content of another file
> Example:.
> * * <xi:include href="Somefile.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude";
> xpointer="element(some_unique_id)" />
>  
> Downstream, I use xsltproc for procesing, but 'xsltproc --xinclude...'
>  does not seem to recognise the use of the ID construct.
> xpointer="element(/1/2/3)"  works fine.
>  
> Any suggestions?
>  
> --Vidar
>  
>  
> 
> 
> ------------------------------------------------------------------------
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <chapter>
>   <title>Test Chapter</title>
> 
>   <section>
>     <title>Including section</title>
> 
>     <para>The next section is inserted as an Xinclude reference</para>
> 
>     <xi:include href="General_Symbol_Drawing_Rules.xml"
>                 xmlns:xi="http://www.w3.org/2001/XInclude";
>                 xpointer="element(point_symb_draw_rules)" />
>   </section>
> 
>   <section>
>     <title>The next local section</title>
> 
>     <para></para>
>   </section>
> </chapter>
> 
> 
> ------------------------------------------------------------------------

Reply via email to