TEI Lite ODD shown by Oxygen as invalid?!
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 1
- Joined: Thu Jul 08, 2021 5:39 pm
TEI Lite ODD shown by Oxygen as invalid?!
I have just downloaded the TEI Lite ODD (tei_lite.odd) from https://tei-c.org/guidelines/customization/ to further modify the file in Oxygen. I have then opened the file in Oxygen. Oxygen, however, indicates that the ODD is invalid; it marks the <alternate> element in the following part of the code as erroneous:
In addition, Oxygen displays the error message: "The alternate element must have at least two child elements."
I am wondering now if the ODD is really erroneous and if it is, with what version of TEI Lite Oxygen is working at the moment since no problem for me arises when I use the usual TEI Lite template to write an XML file conform to TEI Lite. I suppose Oxygen uses the TEI Lite Relax NG schema, but shouldn't this schema have a similar problem?
I am still new to customizing XML schemas: I would be glad for any advice how to fix the ODD.
Thanks in advance for any help.
Elias
Code: Select all
<elementSpec module="header" ident="editorialDecl" mode="change">
<content>
<alternate minOccurs="1" maxOccurs="unbounded">
<classRef key="model.pLike"/>
</alternate>
</content>
<!-- ... -->
</elementSpec>
I am wondering now if the ODD is really erroneous and if it is, with what version of TEI Lite Oxygen is working at the moment since no problem for me arises when I use the usual TEI Lite template to write an XML file conform to TEI Lite. I suppose Oxygen uses the TEI Lite Relax NG schema, but shouldn't this schema have a similar problem?
I am still new to customizing XML schemas: I would be glad for any advice how to fix the ODD.
Thanks in advance for any help.
Elias
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: TEI Lite ODD shown by Oxygen as invalid?!
Hi Elias,
To validate the odd file Oxygen uses a RNG schema located inside its "frameworks" folder:
OXYGEN_INSTALL_DIR/frameworks/tei/xml/tei/custom/schema/relaxng/tei_odds.rng
Inside the RNG file there are extra Schematron checks which impose extra validation rules, and this check:
states that the "tei:alternate" element should have at least two child elements.
So Oxygen reports the error and the ODD is invalid according to the RNG schema we use for validation. We use the official TEI 4.1.0 schemas for validation.
Maybe you can try to ask more about this on the TEI users list as we do not know why the rule was added by the TEI maintainers, we just use the schemas provided by TEI.
Regards,
Radu
To validate the odd file Oxygen uses a RNG schema located inside its "frameworks" folder:
OXYGEN_INSTALL_DIR/frameworks/tei/xml/tei/custom/schema/relaxng/tei_odds.rng
Inside the RNG file there are extra Schematron checks which impose extra validation rules, and this check:
Code: Select all
<pattern xmlns="http://purl.oclc.org/dsdl/schematron"
id="tei_odds-alternate-alternatechilden-constraint-assert-17">
<rule context="tei:alternate">
<sch:assert xmlns:sch="http://purl.oclc.org/dsdl/schematron"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns="http://www.tei-c.org/ns/1.0"
test="count(*)>1">The alternate element must have at least two child elements</sch:assert>
</rule>
</pattern>
So Oxygen reports the error and the ODD is invalid according to the RNG schema we use for validation. We use the official TEI 4.1.0 schemas for validation.
Maybe you can try to ask more about this on the TEI users list as we do not know why the rule was added by the TEI maintainers, we just use the schemas provided by TEI.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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