<xi:include> and TEI namespaces
Questions about XML that are not covered by the other forums should go here.
<xi:include> and TEI namespaces
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
Re: <xi:include> and TEI namespaces
Hi Camille,
When using xi:include it happens quite often that a module is invalid while the main XML document which includes all modules is valid.
This is why Oxygen has the concept of "Master Files":
https://www.oxygenxml.com/doc/versions/ ... -file.html
To make this work, you need to refer in the Oxygen Project view your project's folder. Then right click in the Project view the root element and choose "Enable Master Files Support". In the green "Master Files" folder which appears you can add all your top level XML documents.
After this you can remove the xml-model processing instructions from your XML modules and when validating them Oxygen will actually validate the main XML file.
Regards
Radu
When using xi:include it happens quite often that a module is invalid while the main XML document which includes all modules is valid.
This is why Oxygen has the concept of "Master Files":
https://www.oxygenxml.com/doc/versions/ ... -file.html
To make this work, you need to refer in the Oxygen Project view your project's folder. Then right click in the Project view the root element and choose "Enable Master Files Support". In the green "Master Files" folder which appears you can add all your top level XML documents.
After this you can remove the xml-model processing instructions from your XML modules and when validating them Oxygen will actually validate the main XML file.
Regards
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: <xi:include> and TEI namespaces
Hi Radu,
Thank you so much for answering so fast! This is the first time I really use <xi:include>, and I definitely should have looked better at the ways to configure Oxygen. Your solution works perfectly, and I am really grateful for your help.
Best regards,
Camille
Thank you so much for answering so fast! This is the first time I really use <xi:include>, and I definitely should have looked better at the ways to configure Oxygen. Your solution works perfectly, and I am really grateful for your help.
Best regards,
Camille
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service