This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] XInclude: multiple <preface>s
On Mon, Mar 31, 2003 at 01:50:41PM -0800, Bob Stayton wrote:
> On Mon, Mar 31, 2003 at 04:04:43PM -0500, Daniel Veillard wrote:
> > The XIncluded parts must be well formed XML documents. That's
> > completely indepedant of the DocBook syntax, you don't have the
> > right to put multiple roots in an XML document, be it XIncluded or not.
>
> Slight correction. The document being pointed to must be
> well formed, but the parts being included do not.
Right :-)
> With a little creativity, you can work around this problem.
> Your preface document can be a <book> element that contains
> multiple prefaces. If your XInclude resolver handles
> basic XPointer syntax (like xsltproc does), then you can
> pull in the set of prefaces without the book element:
>
> <xi:include href="preface.xml#xpointer(/book/preface)"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
Yup, that should work, except the xpointer() selector may never
end up being standardized and you may have to do ugly things like
#element(/1/2) instead to have interoperable XIncludes, sigh ...
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard at redhat dot com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org