Issue with DTD Validation : tei_all.dtd and tei_lite.dtd #2585
-
Hello, A researcher wants to make modification to a TEI document but is unsure about the validation of the file and asked me to check. The researcher added hundreds of Here is one exemple : Here is the error message from the validation :
I used the exemple from this page https://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-choice.html and the validation still returned some errors but I managed to avoid validation issues making a small change :
<choice>
<orig>favour</orig>
<reg>favor</reg>
</choice>
<choice>
<orig>favour <reg>favor</reg></orig>
</choice> I decided to open a discussion in order to have advice for this researcher. How to use this |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
On quick read, I think y’all are using |
Beta Was this translation helpful? Give feedback.
-
Confirmed. This is a bug in the TEI’s tei_all.dtd file, probably caused by an error in the Stylesheets. My suspiscion (without having looked at the code) is that it will be fixable, but not easy. But even if it gets fixed next week, it may not make it into a release until January. May I ask why you and the researcher are using DTDs at all? In general it is recommended to use RELAX NG plus Schematron for validating TEI, rather than DTDs (or even XSDs) plus Schematron, because quite a few of the constraints expressed in the TEI RELAX NG schemas cannot be expressed in the DTD language. (And although libxml2 can validate against RELAX NG — e.g., If for some reason you need to continue using DTDs, it is possible to re-define <content>
<alternate minOccurs="2" maxOccurs="unbounded">
<classRef key="model.choicePart"/>
<elementRef key="choice"/>
</alternate>
</content> It is the <content>
<sequence>
<alternate minOccurs="1" maxOccurs="1">
<classRef key="model.choicePart"/>
<elementRef key="choice"/>
</alternate>
<alternate minOccurs="1" maxOccurs="unbounded">
<classRef key="model.choicePart"/>
<elementRef key="choice"/>
</alternate>
</sequence>
</content> the DTD that is generated will have a working content model, at least for |
Beta Was this translation helpful? Give feedback.
Confirmed. This is a bug in the TEI’s tei_all.dtd file, probably caused by an error in the Stylesheets. My suspiscion (without having looked at the code) is that it will be fixable, but not easy. But even if it gets fixed next week, it may not make it into a release until January.
May I ask why you and the researcher are using DTDs at all? In general it is recommended to use RELAX NG plus Schematron for validating TEI, rather than DTDs (or even XSDs) plus Schematron, because quite a few of the constraints expressed in the TEI RELAX NG schemas cannot be expressed in the DTD language. (And although libxml2 can validate against RELAX NG — e.g.,
xmllint --relaxng /path/to/tei_all.rng /path/to…