XInclude not applying schema to included file
Posted: Tue Jan 06, 2004 3:39 am
I'm trying to break my docbook documents into modules but I'm unable to get xinclude to recognize included files as docbook.
I am using a docbook schema as created by the Trang plugin from the docbook DTD. I have configured the Xerces parser to use XInclude, as suggested in this thread. The configuration appeared to work as the <xi:include> tag no longer caused an error.
I get the following errors:
E Document is invalid: no grammar found. xinclude-test.xml http://ada.chi.chicorp/devdocs/test/xinclude-test.xml 4:1
E Document root element "sect1", must match DOCTYPE root "null". xinclude-test.xml http://ada.chi.chicorp/devdocs/test/xinclude-test.xml 4:1
Here is the main file with the <xi:include> tag:
Here is the file to be included (note the include file validates on its own):
Much obliged,
Jonathan
I am using a docbook schema as created by the Trang plugin from the docbook DTD. I have configured the Xerces parser to use XInclude, as suggested in this thread. The configuration appeared to work as the <xi:include> tag no longer caused an error.
I get the following errors:
E Document is invalid: no grammar found. xinclude-test.xml http://ada.chi.chicorp/devdocs/test/xinclude-test.xml 4:1
E Document root element "sect1", must match DOCTYPE root "null". xinclude-test.xml http://ada.chi.chicorp/devdocs/test/xinclude-test.xml 4:1
Here is the main file with the <xi:include> tag:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ada.chi.chicorp/devdocs/style/docbook/xsd/docbook.xsd">
<title>Test XInclude</title>
<xi:include href="./introduction.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:fallback>
<para>FIXME: xi:include failed for 'Introduction'.</para>
</xi:fallback>
</xi:include>
</article>
Here is the file to be included (note the include file validates on its own):
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<sect1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ada.chi.chicorp/devdocs/style/docbook/xsd/docbook.xsd">
<title>Introduction</title>
<para>Some text.</para>
</sect1>
Jonathan