TEIC / TEI

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

`alt/@target` shouldn't require 2+ pointers #2474

Open joeytakeda opened 9 months ago

joeytakeda commented 9 months ago

alt currently overrides the default datatype of att.pointing's @target to require 2+ teidata.pointers—presumably (and sensibly) because alternation requires that there be at least two elements to alternate:

https://github.com/TEIC/TEI/blob/dcfee0087066d4e5e8b507499280460565c30370/P5/Source/Specs/alt.xml#L30-L32

However, that means that an #xpath pointer which returns a sequence of nodes is invalid (see https://listserv.brown.edu/cgi-bin/wa?A2=ind2309&L=TEI-L&D=0&P=64 for context).

We should probably relax this constraint somehow: simplest would be to just revert@target back to its original definition (i.e. getting rid alts attDef for it) and put the requirement for 2+ things in remarks; more complicated would be try and write a constraint such that alt/@target must have either 1+ xpath pointers OR 2+ pointers otherwise.