TEIC / TEI

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

example of decls= shows incorrect non-usage of default= #2274

Open sydb opened 2 years ago

sydb commented 2 years ago

The last example of "HDMN" (i.e., //id('md_en')/ancestor::teix:egXML) contains 2 <metDecl> children of a single <encodingDesc>. By definition, one and only one is supposed to bear a @default attribute with the value "true".

Each of the above elements [which includes <metDecl>] is repeatable within a single header; that is, there may be more than one instance of any declarable element type at a given level. When this occurs, the following rules apply. For each different type of declarable element which occurs more than once:

  • each must bear a unique identifier
  • when occurring within the same parent element, exactly one element must be specified as the default, by having a default attribute with the value "true".

//id('CCAS2')/p[3]/list[1] (To see on the web look for the bullet list immediately above the example.)

This is a trivially easy fix. Just need to insert default="true" in one of the 2 <metDecl> start-tags. But which one?

martindholmes commented 1 year ago

Presumably this one:

https://www.tei-c.org/release/doc/tei-p5-doc/en/html/VE.html#index-egXML-d54e60654

martindholmes commented 1 year ago

Council F2F has decided that the requirement to have a default attribute should be removed, and the prose modified to clarify that processors should use the default if it's there; in the absence of a default, where multiple Decls exist and elements lack @decl attributes the @xml:lang attributes in effect for the Decl and content elements should be used as a guide for the processor to select an appropriate *Decl to apply.

lb42 commented 1 year ago

This doesn't seem like a good idea. Surely you might have multiple *Decl elements using the same @xml:lang. In the absence of a specified default should a processor signal an error? or just choose the first one, or the one it likes best or what?