RelaxNG and XInclude not validating correctly
Posted: Tue Jul 15, 2008 9:37 pm
I have a document that I'm validating against a RelaxNG schema, and whenever I have a document that uses an XInclude to reference another entity, the validation fails complaining that the element that I'm referencing is not allowed in this context. However, if I paste the element inline and remove the XInclude, it validates just fine. I have XInclude processing turned on. Here's a snippet of the XML I'm dealing with:
Base XML:
And the XIncluded document looks like this:
The editor shows the error in the XIncluded file and shows the file_contents element, so it's getting the resource, just won't validate it. Does the RelaxNG schema have to have something special in it to allow XIncludes?
Thanks!
Base XML:
Code: Select all
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"
xmlns:xinclude="http://www.w3.org/2001/XInclude">
<configure>
<files config:type="list">
<file id="file">
<xinclude:include
href="http://www.example.com/file.xml"/>
<file_path>/tmp/file</file_path>
</file>
</files>
</configure>
</profile>
Code: Select all
<?xml version="1.0"?>
<file_contents><![CDATA[File Data
]]>
</file_contents>
Thanks!