validation error using xinclude in tei file
Posted: Thu Feb 10, 2022 2:02 pm
Hi,
I have a tei file with a long <encodingDesc> structured like the following example:
The file is validated using 'http://www.tei-c.org/release/xml/tei/cu ... ei_all.rng'
When I replace the encodingDesc with content from an external file using xi:include, the validation fails.
path/to/file.xml:
Validation error: 'element "encodingDesc" not allowed here; expected the element end-tag or element "encodingDesc", "profileDesc", "revisionDesc" or "xenoData"'
I have been able to include other elements succesfully using xi:include, the error so far only appears when I try to include the encodingDesc.
Any ideas why this happens?
Thanks in advance!
I have a tei file with a long <encodingDesc> structured like the following example:
Code: Select all
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title type="main" xml:lang="en">Testfile</title>
</titleStmt>
<publicationStmt>
<p>Test</p>
</publicationStmt>
<sourceDesc>
<p>Testfile</p></sourceDesc>
</fileDesc>
<!-- encodingDesc to be replaced by xi:include -->
<encodingDesc>
<charDecl>
<char></char>
</charDecl>
</encodingDesc>
</teiHeader>
<text>
<body>
<p>Some text</p>
</body>
</text>
</TEI>
When I replace the encodingDesc with content from an external file using xi:include, the validation fails.
Code: Select all
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" schematypens="http://relaxng.org/ns/structure/1.0"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title type="main" xml:lang="en">Testfile</title>
</titleStmt>
<publicationStmt>
<p>Test</p>
</publicationStmt>
<sourceDesc>
<p>Testfile</p></sourceDesc>
</fileDesc>
<!-- encodingDesc to be replaced by xi:include -->
<xi:include href="path/to/file.xml" xpointer="encodingDesc" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</teiHeader>
<text>
<body>
<p>Some text</p>
</body>
</text>
</TEI>
path/to/file.xml:
Code: Select all
<encodingDesc xml:id="encodingDesc">
<charDecl>
<char></char>
</charDecl>
</encodingDesc>
I have been able to include other elements succesfully using xi:include, the error so far only appears when I try to include the encodingDesc.
Any ideas why this happens?
Thanks in advance!