If all of these XIncludes are readable
files whose root elements are section elements, then this document should
validate. I just tried it and could not duplicate your problem. Can
you describe how you are validating, including the versions of the tools you are
using, as well as the error message you are getting?
----- Original Message -----
Sent: Tuesday, July 05, 2005 12:20
AM
Subject: [docbook] XInclude problem
Hi all,
I got a problem with XInclude. I have a
document, root element is <section>:
<?xml version="1.0"
encoding="UTF-8"?> <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook
XML
V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd"> <section
id="summary_rep"> <!-- this is the root -->
<title>Summary Report</title> <para>bla bla
bla.</para>
<xi:include href="F_subscr_info.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="F_net_info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="F_net_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="F_desktop_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<section
id="summary_chrono">
... </section> </section>
and this document
validates and XInclude works perfectly. Note that included documents have also
<section> as the root element.
But I also have a different
document:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE
section PUBLIC "-//OASIS//DTD DocBook XML
V4.3//EN"
"http://www.docbook.org/xml/4.3/docbookx.dtd"> <section
id="summary_rep"> <!-- this is the root -->
<title>Summary Report</title> <para>bla bla
bla.</para>
<xi:include href="F_subscr_info.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="F_net_info.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="F_net_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="F_desktop_status.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<section
id="summary_chrono">
... </section> <xi:include href="F_mail.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include> </section>
I
can't validate this document though the included one is similar to those in
the above example. The error message says the last xinclude element is unknown
and the content of the section must match... and here goes the list of allowed
elements. Those xincludes at the top are resolved but that at the bottom
isn't. What's wrong with this document and why xinludes aren't allowed in the
place I chose.
Tks,
Zbyszek
|