Open raffazizzi opened 1 month ago
Sorry, I am still not convinced that having <classRef>
as a child of <alternate>
or <interleave>
will be sufficient. So bear with me while I think this through aloud.
We are talking about references to classes that are currently expandable into one of:
( a | b | c )
, the default),( a, b, c )
),( a?, b?, c? )
),( a+, b+, c+)
), and( a*, b*, c* )
).We are planning to drop the "sequence" possibilities because we have no mechanism of determining a good sequence or allowing a customizer to change it. But we are (or at least I am) hoping to add interleave capability. In which case we need to be able to represent the parallel structures: "interleave" (( a & b & c )
), "interleaveOptional" (( a? & b? & c? )
), "interleaveRepeatable" (( a+ & b+ & c+)
), and "interleaveOptionalRepeatable" (`( a & b & c )`).
I don’t think there is any way to represent those 4 possibilities just by noticing that the parent of <classRef>
is <interleave>
. Besides, what if I wanted an interleave of the classes, not of the elements that are members the classes? E.g., we would like the content model of <respStmt>
to be
<interleave>
<elementRef key="resp" minOccurs="1" maxOccurs="unbounded"/>
<classRef key="model.nameLike.agent" minOccurs="1" maxOccurs="unbounded"/>
</interleave>
(We can’t do that, of course, because we can’t use <interleave>
, as it has no equivalent in the DTD language.) That is, we want a minimum of <resp>
and one of the nameLike.agent elements, not all of them.
So I think I have now convinced myself that being a child of <interleave>
does not cut it. We need a tighter mechanism to specify the expansion of a class reference. (By “tighter” I mean tied closer to the class reference itself.)
Would it suffice to add an attribute to <interleave>
to indicate the type of interleaving desired?
We could add an attribute to classRef:
@use="members"
, @use="class"
, or
@use="one"
, @use="any"
, or @use="all"
This PR is work in progress to address issue #2369
@generate
on<classSpec>
and implement a 6-month deprecation period.@expand
on<classRef>
in the 4 instances where it is mentioned in the Guidelines with<elementRef>
s@expand
on<classRef>
for 6 months, and make<classRef>
a child of<alternate>
instead (and potentially<interleave>
once added. See https://github.com/TEIC/TEI/pull/2538.