xinclude validation error

duncdrum
Posts: 4

xinclude validation error

Fri Feb 19, 2016 6:21 pm

I have 51 tei documents with dictionary entries.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="/../tei_header.xml" parse="xml"/>
<text>
<body>
<entry/><!-- Lots of entries -->
</body>
</text>
</TEI>


I have a separate header file:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<teiHeader xmlns="http://www.tei-c.org/ns/1.0" xml:lang="en">
<fileDesc/><!-- Stuff here -->
</teiHeader>


yet i keep getting validation error:
element "xi:include" not allowed here; expected the element end-tag or element "facsimile", "fsdDecl", "sourceDoc", "teiHeader" or "text"

xincludes are activated in Preferences->XML / XML Parser
Master files is enabled, and the header file is it.

When manually replace the xinclude element with a copy of the contents of tei_header.xml everything validates fine.
What am i missing
Radu
Posts: 5088

Re: xinclude validation error

Mon Feb 22, 2016 9:52 am

Hi,

The xi prefix should be bound to the namespace http://www.w3.org/2001/XInclude:

https://www.w3.org/TR/xinclude/

so this should work:

Code: Select all

<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tei_header.xml" parse="xml"/>


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
duncdrum
Posts: 4

Re: xinclude validation error

Mon Feb 22, 2016 1:40 pm

2001 does the trick, no clue how i messed this up, Thanks for the help

Return to “TEI”

Who is online

Users browsing this forum: No registered users and 0 guests