This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [docbook-apps] XInclude: multiple <preface>s


Using XInclude, each file you include has to be a "well-formed" XML
document.  That is, it is only allowed to have one top level element.  This
is different from using entity references to include document fragments,
which only need to be "well-balanced".  If you want to use XInclude, you
will need to put each preface in its own file.

-----Original Message-----
From: Michael Wiedmann [mailto:mw at miwie dot in-berlin dot de]
Sent: Monday, March 31, 2003 3:07 PM
To: DocBook-Apps ML
Subject: [docbook-apps] XInclude: multiple <preface>s


I try to separate a large <book> into smaller XML file using XInclude.
That works of course in general but how do I put several <prefaces>s 
into a separate XML file and XInclude it?

<book>
 <bookinfo>
 ...
 </bookinfo>

 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude";
   href="preface.xml" />
 
 <chapter>
 ...
 </chapter>
</book>

If 'preface.xml' contains more than one <preface> (which is IMHO valid
DocBook), then 

$ xmllint -xmllint book-master.xml > book.xml

complains like:

preface.xml:76: error: Extra content at the end of the document
<preface id="download">
^
XInclude: could not load preface.xml, and no fallback was found


Any workaround?

Michael
-- 
mw at miwie dot in-berlin dot de                              http://www.miwie.org
mw at miwie dot org

---------------------------------------------------------------------
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



---------------------------------------------------------------------
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]