I too have run into the same problem and resorted to using xincludes to
import all of the required paragraphs... It works but it is a pain.
-Original Message-
From: Peter Desjardins [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 10, 2007 11:52 AM
To: David Cramer (Tech Pubs); docbook-apps@lists.oasis-open.org
Subject: RE: [docbook-apps] Reusing section where a
chapter should be - and the reverse
That xpointer did work perfectly. Thank you!
This may be a question for the docbook list but is this a
common problem encountered when reusing content? I've run
into it many times when making short excerpts of material in
larger technical references.
Now I have a working solution so I'm happy. XMLMind won't
accept the syntax of the xpointer but since I'm actually
writing the content in other documents it doesn't matter.
Peter Desjardins
-Original Message-
From: David Cramer (Tech Pubs) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 10, 2007 09:39
To: Peter Desjardins; docbook-apps@lists.oasis-open.org
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(//[EMAIL PROTECTED]'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:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]