<xi:include> and TEI namespaces
Posted: Tue Mar 26, 2019 4:38 pm
Hi,
First of all, I apologize if a similar topic already existed, and I did not found it.
I am currently working on a TEI project. (I shall indicate that, as the project is still evolving, I am still using the TEI All schema, and have not created my own personalised ODD yet!)
The corpus I am encoding is quite big, so I created a main file containing the <teiCorpus> element, then a separate file for each document, starting with the <TEI> element, and incorporated in the main file with <xi:include>. It works well!
Today, I wanted to do the same for my indexes (<listPlace> and <listPerson>) : they are expected to become quite big too, so I thought it would be easier that way in order to edit them, especially for the people working with me.
Here is what I wrote in my main file (I have previously declared the xi namespace in my root element, with : xmlns:xi="http://www.w3.org/2001/XInclude") :
And here is all the current content of said listPerson.xml file :
With this, my main file is valid, but the listPerson.xml file displays the following error : element "listPerson" not allowed here; expected element "TEI" or "teiCorpus".
I understand well that a TEI file should of course not start directly with the <listPerson> element. However, if I remove the xmlns="http://www.tei-c.org/ns/1.0" attribute in the <listPerson> element, my main file become invalid, as my elements are not recognized as TEI elements anymore. (I also tried to remove the TEI All default <?xml-model> in the listPerson.xml file, but it did not change anything.)
I know that this forum is not dedicated to TEI, but I wished to ask if someone had a solution for a case like this? Or should I maybe continue with an invalid listPerson.xml file, as my main file is valid?
I hope my English was understandable, and I'm thanking you in advance for reading my message.
Best regards,
Camille
First of all, I apologize if a similar topic already existed, and I did not found it.
I am currently working on a TEI project. (I shall indicate that, as the project is still evolving, I am still using the TEI All schema, and have not created my own personalised ODD yet!)
The corpus I am encoding is quite big, so I created a main file containing the <teiCorpus> element, then a separate file for each document, starting with the <TEI> element, and incorporated in the main file with <xi:include>. It works well!
Today, I wanted to do the same for my indexes (<listPlace> and <listPerson>) : they are expected to become quite big too, so I thought it would be easier that way in order to edit them, especially for the people working with me.
Here is what I wrote in my main file (I have previously declared the xi namespace in my root element, with : xmlns:xi="http://www.w3.org/2001/XInclude") :
Code: Select all
<particDesc>
<xi:include href="listPerson.xml"/>
</particDesc>
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"?>
<listPerson xmlns="http://www.tei-c.org/ns/1.0">
<!-- My soon-to-be index nominum -->
<person/>
</listPerson>
I understand well that a TEI file should of course not start directly with the <listPerson> element. However, if I remove the xmlns="http://www.tei-c.org/ns/1.0" attribute in the <listPerson> element, my main file become invalid, as my elements are not recognized as TEI elements anymore. (I also tried to remove the TEI All default <?xml-model> in the listPerson.xml file, but it did not change anything.)
I know that this forum is not dedicated to TEI, but I wished to ask if someone had a solution for a case like this? Or should I maybe continue with an invalid listPerson.xml file, as my main file is valid?
I hope my English was understandable, and I'm thanking you in advance for reading my message.
Best regards,
Camille