Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First crack at addressing #2173 in a serious way. #2442

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft

Conversation

sydb
Copy link
Member

@sydb sydb commented Jun 17, 2023

Holy smoke. This has been a lot of work.

Branch name is “sydb_2173”. It builds on my local system (in a docker container), and passes the tests established on the ticket. Only possible problem I have noticed is the "unique_xmlIDs" constraint of tei_customization is not contextualizable. That is on purpose, of course. The current Stylesheets generate "@xml:id" as the value of @context, thus firing on all occurrences of @xml:id (whether the element it appears on got it via att.global or not), which is the desired effect. If necessary we can just add an <sch:rule context="@xml:id"> wrapper. (It would be added in P5/Utilities/TEI-to-tei_customization.xslt, around line 1465.)

Things I had to do to make this (putting the constraint demonstrated in the ODD attached to the ticket into constraintSpec.xml) work follow, not in any particular order.

  1. Added more informative messages to P5/Makefile and P5/antbuilder.xml
  2. In the 2nd @test in the new "context_for_constraint" constraint (the major complex one — “I am inside a <specGrp>”, “and there are one or more references to one or more of my <scpecGrp> ancestors” …) I added a clause to exclude cases of <elementSpec> inside <specGrp>. (There are 47 such cases in the Guideliens.)
  3. I added a predicate to the @context of the <sch:rule> so it is not fired if the <constraintSpec> is a descendant of an <egXML>. (This is only necessary because of how the build process does testing, I think. If you look at p5examples.isosch.xsl (very carefully) you will find that the tei: prefix is bound to the Examples namespace.)
  4. Within an XPath comment in that same @test I changed “don't” to “don’t” (i.e., U+0027 → U+2019), because the U+0027 caused Utilities/iso_dsdl_include.xsl to mis-count the parentheses, and thus broke the build.
  5. I tweaked some wording in TD. (I did not fix the incorrect prose about <sch:ns>.)
  6. I replaced expected-results/ValidatorLog.xml. Note also that in doing so I added the new comments generated by Utilities/validator.xsl and deleted a whole bunch of old warnings that, as far as I know, are long since past their usefulness.

@sydb sydb added this to the Guidelines 4.7.0 milestone Jun 17, 2023
@sydb sydb marked this pull request as draft September 20, 2023 15:34
@sydb
Copy link
Member Author

sydb commented Sep 20, 2023

This PR will probably never be needed, as we expect Council to simply require @context in all cases of <sch:assert> or <sch:report> within a <constraint>.
But some of the work here may be useful. So we should kill this PR when the above has been done.

@raffazizzi raffazizzi removed this from the Guidelines 4.7.0 milestone Nov 9, 2023
if (@ident)
then concat('(&quot;', @ident,'&quot;)')
else ''"/> has no @context, but is in a specGrp that has at
least 1 reference to it that is not contextulizable.</sch:report>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: contextulizable (missing "a") and I would spell out 1 to "one"

@sabineseifert
Copy link
Contributor

Full Council discussion at VF2F 16 March 2024:

  • PR can be closed “won’t fix” because #2513 is a superset of this
  • branch should not be deleted yet, as there are some other changes (particularly to Makefile and buid.xml) that we may want to keep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants