There are 6 uses of <attList org="choice"> in the Guidelines:
(See below for glossary of column headings.)
element
attributes
works?
+cS?
note
<anyElement>
@include, @except
NO
no
[1,2]
<classRef>
@include, @except
yes
no
<dataRef>
@key, @name, @ref
yes
no
<moduleRef>
@include, @except
yes
yes
<moduleRef>
@key, @url
yes
yes
<relation>
@active, @mutual
yes
yes
[3]
element = The element specification that contains the choice=org. (There are none in other specifications.)
attributes = The attributes that are in alternation with one another.
works? = Whether or not the patterns in tei_all.rnc correctly enforce the alternation — i.e., whether or not the Stylesheets work correctly in this case.
+cS = Is there an added <constraintSpec> that also enforces this disjunction?
note = Note anchors, if any.
Major Problem (not this ticket)
In at least one case of elementSpec//attList[@org eq 'choice'] it does not work. IIRC, it also never works in cases of over-riding an attribute defined in a class. But those are problems for the Stylesheets repo, not this repo.
Secondary Problem (this ticket)
I think we should consistently have an additional <constraintSpec> in all cases or (better yet) not have it in any cases.
Tertiary Finding
(This ticket, but only because there were other problems; this one is a small, corrigible error I would have just fixed in dev without discussion. But since the discussion here might result in “just delete it” …)
The <constraintSpec ident="not-except-and-include"> in <moduleRef> is misplaced. (It is a child of the "prefix" attribute definition; it should be the child of either the "except" or "include" attribute definition.)
Notes
[1] @martindholmes actually has a (not unreasonable) use case for allowing both attributes, anyway.
[2] See also #2357.
[3] There is an interesting annotation in an XML comment in the <constraintSpec>: “this constraint is pointless in RELAX NG land, where the org=choice works. It is useful in DTD land, where the attList/@org has no effect. It looks to me like it is useful in W3C XML Schema land, too, which I find suprising, as I thought XSD could express a disjuntion like that w/o difficulty. (But I may be reading the XSD incorrectly.) — Syd, 2018-05-01”.
Introduction
There are 6 uses of
<attList org="choice">
in the Guidelines:<anyElement>
@include
,@except
<classRef>
@include
,@except
<dataRef>
@key
,@name
,@ref
<moduleRef>
@include
,@except
<moduleRef>
@key
,@url
<relation>
@active
,@mutual
<constraintSpec>
that also enforces this disjunction?Major Problem (not this ticket)
In at least one case of
elementSpec//attList[@org eq 'choice']
it does not work. IIRC, it also never works in cases of over-riding an attribute defined in a class. But those are problems for the Stylesheets repo, not this repo.Secondary Problem (this ticket)
I think we should consistently have an additional
<constraintSpec>
in all cases or (better yet) not have it in any cases.Tertiary Finding
(This ticket, but only because there were other problems; this one is a small, corrigible error I would have just fixed in dev without discussion. But since the discussion here might result in “just delete it” …)
The
<constraintSpec ident="not-except-and-include">
in<moduleRef>
is misplaced. (It is a child of the "prefix" attribute definition; it should be the child of either the "except" or "include" attribute definition.)Notes
[1] @martindholmes actually has a (not unreasonable) use case for allowing both attributes, anyway. [2] See also #2357. [3] There is an interesting annotation in an XML comment in the
<constraintSpec>
: “this constraint is pointless in RELAX NG land, where the org=choice works. It is useful in DTD land, where theattList/@org
has no effect. It looks to me like it is useful in W3C XML Schema land, too, which I find suprising, as I thought XSD could express a disjuntion like that w/o difficulty. (But I may be reading the XSD incorrectly.) — Syd, 2018-05-01”.