OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Reusing <section> where a <chapter> should be - and the reverse


Try this:

<chapter>
    <xi:include href="docbook-file-containing-the-modular-content.xml"
                xmlns:xi="http://www.w3.org/2001/XInclude";
 
xpointer="xpointer(//section[@id='IdOfTheSectionElement']/*)"/> 
</chapter>

David

> Reading Chapter 22. Modular DocBook files in DocBook XSL led 
> me to believe that the following xi:include could solve the 
> problem for me.  I expect it to include every child element 
> of a <section> element in the <chapter> element.
> 
> <chapter>
>     <xi:include href="docbook-file-containing-the-modular-content.xml"
>                 xmlns:xi="http://www.w3.org/2001/XInclude";
>                 xpointer="element(IdOfTheSectionElement/*)" 
> /> </chapter>
> 
> But the xi:include fails.  I use xmllint to resolve 
> xi:includes.  It gives the following errors:
> 
> docbook-file-that-is-including.xml:11: element include: 
> XInclude error :
> XPointer evaluation failed: #element(IdOfTheSectionElement/*)
> docbook-file-that-is-including.xml:11: element include: 
> XInclude error :
> could not load 
> docbook-file-containing-the-modular-content.xml, and no 
> fallback was found
> 
> Is my xpointer syntax incorrect?  Other xi:includes from the 
> same source file resolved without any trouble (they include 
> entire elements).
> 
> Is there a better way to reuse <section> and <chapter> 
> elements in each other's hierarchical places?
> 
> In case it matters, here's my xmllint version:
> 
> $ xmllint --version
> xmllint: using libxml version 20626
>    compiled with: Threads Tree Output Push Reader Patterns 
> Writer SAXv1 FTP HTTP DTDValid HTML Legacy C14N Catalog XPath 
> XPointer XInclude Iconv ISO8859X Unicode Regexps Automata 
> Expr Schemas Schematron Modules Debug
> 
> 
> Thanks for your help!
> 
> Peter Desjardins
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: 
> docbook-apps-help@lists.oasis-open.org
> 
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]