Open joeytakeda opened 1 year ago
To be clear, the order is obviously non-informational. This change would just be in a (possibly vain) attempt to make the specification XML easier to read by humans.
I am not against it (nor really in favor), but if we do this we would want to add a <constraintSpec>
to p5odds.odd that enforces the order in the future.
Also this ticket does not address model class positioning vs attribute classes, but I think we may as well do both at once.
Thus
<sch:rule context="tei:classes">
<sch:let name="keys_as_specified" value="tei:memberOf/@key"/>
<sch:let name="keys_in_order"
value="if ( $keys_as_specified = 'att.global' )
then ( 'att.global', sort( $keys_as_specified )[. ne 'att.global'] )
else sort( $keys_as_specified )" />
<sch:assert test="string-join( $keys_as_specified ) eq string-join( $keys_in_order )">
class membership should be specified in sorted order, except att.global goes first.
</sch:assert>
</sch:rule>
Oh dear. What to do? I had intended to commit to a new branch, but somehow changes ended up in dev branch, instead.[1] Then, when my changes ended up in dev, not my new branch, I came here to look and realized I was not assigned to this ticket. (Somehow I left the F2F Council meeting last weekend thinking I was assigned to this one.) Sigh. Anyway, all tests are passing in the docker. There are a dozen occurrences of the new warning message, but those can be picked off at our leisure. So I am not personally inclined to try to revert this change and re-create it in a new branch, issue a PR, and have it pulled into dev. In large part because doing that would exceed my current git capabilities.
Note [1] I am guessing that the problem is that I have different setting in my .git file on my desktop and laptop. Because I can swear on a ton of bricks that the sequence of git commands I used has done what I want in the past, but did not this time. For the record, here is the console transcript for what I did:
(599) Padfoot ~/Documents/TEI_gitHub/P5 @ 08:32:48 ->git status -uno
On branch dev
Your branch is ahead of 'origin/dev' by 2 commits.
(use "git push" to publish your local commits)
nothing to commit (use -u to show untracked files)
(600) Padfoot ~/Documents/TEI_gitHub/P5 @ 08:32:51 ->git checkout -b sydb_issue_2463
Switched to a new branch 'sydb_issue_2463'
(601) Padfoot ~/Documents/TEI_gitHub/P5 @ 08:33:22 ->git push
Enumerating objects: 1786, done.
Counting objects: 100% (1786/1786), done.
Delta compression using up to 4 threads
Compressing objects: 100% (1033/1033), done.
Writing objects: 100% (1033/1033), 105.70 KiB | 522.00 KiB/s, done.
Total 1033 (delta 1021), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1021/1021), completed with 752 local objects.
To github.com:TEIC/TEI.git
ac2d0f7e0..d84b97546 dev -> dev
(602) Padfoot ~/Documents/TEI_gitHub/P5 @ 08:33:33 ->
As discussed at the F2F, we have tended to order
classes/memberOf
as att.global first, and then alphabetical for the rest. Only 14 elements do not haveatt.global
as their first attribute class child (i.e.classes[not(memberOf[starts-with(@key,'att.')][1]/@key = 'att.global')]
):<change>
:<death>
:<fDecl>
:<geogFeat>
:<geogName>
:<line>
:<media>
:<objectName>
:<offset>
:<placeName>
:<ptr>
:<punctuation>
:<ref>
:<stage>
:I submit these should be all be changed to
att.global
and then alphabetically (A-Z)