Closed dmj closed 2 months ago
Or, perhaps better yet, if we get @org
to work properly in atop (it does not in the current Stylesheets):
<elementSpec xmlns="http://www.tei-c.org/ns/1.0" module="tagdocs" ident="attRef">
<gloss versionDate="2005-04-13" xml:lang="en">attribute pointer</gloss>
<!-- ... -->
<attList org="choice">
<attList org="group">
<attDef ident="class" usage="req">
<desc versionDate="2013-11-16" xml:lang="en">the name of the attribute class</desc>
<datatype><dataRef key="teidata.name"/></datatype>
</attDef>
<attDef ident="name" usage="opt">
<desc versionDate="2013-11-16" xml:lang="en">the name of the attribute</desc>
<datatype><dataRef key="teidata.name"/></datatype>
</attDef>
</attList>
<attDef ident="class" usage="opt">
<desc versionDate="2013-11-16" xml:lang="en">the name of the attribute class</desc>
<datatype><dataRef key="teidata.name"/></datatype>
</attDef>
<attDef ident="name" usage="req">
<desc versionDate="2013-11-16" xml:lang="en">the name of the attribute</desc>
<datatype><dataRef key="teidata.name"/></datatype>
</attDef>
</attList>
<!-- ... -->
<listRef>
<ptr target="#TDmodules"/>
</listRef>
</elementSpec>
Or, perhaps better yet,
How would properly implementing attList
solve the missing documentation of attRef
?
Okay, @sydb, I get what you are talking about. Still, the ambiguous case is no @class
and just a @name
: An attList
may declare multiple attributes with the same name.
True enough (that just @name
is not a good idea). But no, I do not think an <attList>
may declare multiple attributes with the same QName. Thoughts:
<attRef>
with @name
but not @class
does not mean the named attribute from this <attList>
. I am not actually sure what it means, if anything, but that certainly can’t be right. (Not even Sebastian was that crazy; but as was his usual, this is underspecified.)<attList>
that enforces the idea that it may not declare multiple attributes with the same QName. Before we had <attRef>
this would not have been difficult to do. If TEI decides that @name
is a required attribute of <attRef>
, it is still reasonably easy to write.<attRef>
has no mechanism to select one attribute over another that has the same local name. That is, given an attribute class definition for att.formalLangIdentifiers that creates an @xml:lang
, a @tei:lang
, and an @iso:lang
, our <attRef>
has no way to say which @lang
it wants, does it? (We make an exception for xml:*
, but in general do not use prefixes to differentiate namespaces, as we do not know what prefix is mapped to which namespace URI.)@sydb, @HelenaSabel and I consider that using <attRef>
to point to a collection of one or more attributes defined in RNG is not really a good idea; instead, there should be another way to do this (<rngRef>
?). Unless and until that happens, ATOP need not concern itself with <attRef>
s that don't point to ODD-defined entities, and ATOP will require both @name
and @class
, and we suggest (see https://github.com/TEIC/TEI/issues/2282) that TEI make the same requirement.
Closing this: see TEI issue https://github.com/TEIC/TEI/issues/2282, where work is under way. Also https://github.com/TEIC/TEI/issues/2548.
An
attList
may contain zero or moreattRef
elements referencing an attribute specification. TheattRef
has two attributes,@class
and@name
which are both optional.https://tei-c.org/release/doc/tei-p5-doc/en/html/ref-attRef.html
This gives four possible variations:
@class
@name
@name
in the currentattList
@class
@name
in@class
Observations:
attRef
at allattRef
that raises an error if the element has neither the@class
nor the@name
attribute