Validating a TEI doc with a Roma-generated schema, I noticed that duplicate values for @xml:id did not produce validation errors.
I checked the .rnc schema, whose declaration for @xml:id looks as follows:
## (identifier) provides a unique identifier for the element bearing the attribute.
attribute xml:id { text }?
...which clearly should read (checked in teilite.rnc in the TEI 1.5.0 distribution):
## (identifier) provides a unique identifier for the element bearing the attribute.
attribute xml:id { xsd:ID }?
This error is reproducible when generating schemas (any flavour) from following ODD files (from the TEI 1.5.0 distribution - web Roma version 3.12):
-tei_all.odd
-tei_allPlus.odd
-tei_docs.odd
-tei_odds.odd
Note: apparently, derived DTDs do declare the correct datatype:
xml:id ID #IMPLIED
In W3C schemas, the xml.xsd schema for these files define @xml:id as:
<xs:attribute name="id"/>
instead of:
<xs:attribute name="id" type="xs:ID"/>
Moreover, the error is present in the derived schema files in the TEI 1.5.0 distribution (in the tei/custom/schema folder).
I don't know what triggers this error; hopefully above list helps identifying the cause (all other exemplar ODD files produce correct schemas).
I am afraid this is deliberate. The datatype of xml:id is changed to "text" whenever macro.anyXML is used (eg in the content model of <egXML>), because otherwise it
causes a conflict in the Jing library. Since that is used by oXygen, I have had to implement the compromise. http://blog.jclark.com/2009/01/relax-ng-and-xmlid.html analyzes the situation.
I can reverse the behaviour, but at the cost of generating an error for many jing and oXygen users.
The only workaround is to redefine macro.anyXML in your ODD to remove the "any attribute at all" pattern.
Solutions to the problem _very_ welcome
This issue has finally been resolved, and the revised setup will available in the July 2010 release