[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: 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@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]