XInclude not applying schema to included file
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 12
- Joined: Fri Nov 07, 2003 1:24 am
XInclude not applying schema to included file
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
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
-
- Posts: 12
- Joined: Fri Nov 07, 2003 1:24 am
Using alternative
Hi Dan,
Thanks for looking into it. I appreciate it in light of the fact that the problem is with Xerces. I was hoping a little additional syntax would make Xerces happy.
As a compromise, I'm using xmllint, as suggested at Sagehill, to build a "resolved" document to apply the stylesheet to. Eg,
This works well to one level of indirection but loses it's appeal beyond that. Still, this is much better than one huge XML doc.
Let me add that I've really enjoyed using Oxygen. It's a fine editor and the results are making an impression with the boss.
Cheers,
Jonathan
Thanks for looking into it. I appreciate it in light of the fact that the problem is with Xerces. I was hoping a little additional syntax would make Xerces happy.
As a compromise, I'm using xmllint, as suggested at Sagehill, to build a "resolved" document to apply the stylesheet to. Eg,
Code: Select all
xmllint --xinclude master.xml >resolved.xml
Let me add that I've really enjoyed using Oxygen. It's a fine editor and the results are making an impression with the boss.
Cheers,
Jonathan
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service