TEIC / TEI

The Text Encoding Initiative Guidelines
https://www.tei-c.org
Other
269 stars 88 forks source link

mismatch between `elementSpec/@prefix` definition and documentation #2319

Closed sydb closed 2 years ago

sydb commented 2 years ago

The tagdoc for <elementSpec> clearly says that the @prefix attribute has as its value 0–1 occurrences of teidata.xmlName. Makes sense, because it is defined as

      <datatype minOccurs="0"><dataRef key="teidata.xmlName"/></datatype>

The <remarks> then go on to explain that “Colons, although permitted inside the value, will cause an invalid schema to be generated.”

Two problems jump out at me:

  1. Colons are not permitted inside the value (because teidata.xmlName is xs:NCName).
  2. Zero occurrences of xs:NCName (i.e., prefix="") is flagged as an error, because the RELAX NG actually has attribute prefix { xsd:NCName }?, which means that the attribute is optional, but if it is present it must have a value.

(1) is just a documentation error, IMHO, to be solved here, probably by deleting the <remarks>. (2) is likely to be a Stylesheets problem, so will probably have to make a similar ticket on that repo.

(Problem (2) is also a problem for the @prefix of <moduleSpec> and <schemaSpec> but they have avoided problem (1).)