Validation error when including file
Posted: Wed Apr 17, 2013 6:41 pm
I am attempting to include an external (local) XML file in my main document, but this is causing a rather perplexing validation error:
My include directive looks like this:
The file I am attempting to include is essentially this:
The error indicates the <classDecl> is not legal at this point, in the file, but if I paste the entire <classDecl> element from the include file directly in the main document at the location where the <xinclude> directive is, the file validates just fine.
This makes absolutely no sense. Can someone kindly point out where I am in error?
Many thanks in advance.
Code: Select all
System ID: C:\Users\scott\Documents\project\include\include-taxonomies.xml
Main validation file: C:\Users\scott\Documents\project\inscriptions\rib01322.xml
Schema: C:\Program Files\Oxygen XML Editor 14\frameworks\tei\xml\tei\custom\schema\relaxng\tei_all.rng
Engine name: Jing
Severity: error
Description: element "classDecl" not allowed here; expected element "ab", "appInfo", "charDecl", "classDecl", "editorialDecl", "fsdDecl", "geoDecl", "listPrefixDef", "metDecl", "p", "projectDesc", "refsDecl", "samplingDecl", "schemaSpec", "styleDefDecl", "tagsDecl" or "variantEncoding"
Start location: 3:2
End location: 3:11
Code: Select all
<xi:include href="../include/include-taxonomies.xml"/>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<classDecl>
<taxonomy xml:id="RIB-genre">
<category xml:id="slab">
<catDesc>Slab</catDesc>
</category>
...
</taxonomy>
</classDecl>
This makes absolutely no sense. Can someone kindly point out where I am in error?
Many thanks in advance.