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

Improve SQF and language handling of Schematron extraction process #704

Merged
merged 3 commits into from
Oct 29, 2024

Conversation

sydb
Copy link
Member

@sydb sydb commented Oct 25, 2024

An attempt to address #702. Note that there are a lot of changes, here. So I think the best way to review this PR is not to try to read all the actual code changes, but rather to whip up a bunch of ODD files that

  • do and do not have a <constraintDecl>[1]
  • when there is a <constraintDecl>, have only <sch:ns> children of it, or have both <sch:ns> children and something else; maybe try it empty, too
  • have a namespace or two declared on <schemaSpec>, <elementSpec>, and <attDef> via @ns
  • have <constraint>s in various languages (either by having @xml:lang or by being inside a <constraintSpec> or <div> or whatever that itself has an @xml:lang)

And then convert the ODD file to Schematron with odds/extract-isoschematron.xsl using various values on the $lang parameter, and check that the output looks reasonable. Note that the teitoschematron --odd --lang=ja /path/to/test/file.odd command in this branch has been modified to leave the /path/to/test/file.odd.processedodd file lying around, so after you have generated it once you can then (relatively quickly) run just the extract-isoschematron.xsl with various other values for $lang.

As for testing this branch with the make test and make test2 commands, I have updated the expected results to match this new version. The Test2/ tests all pass, but the Test/ test suite dies for inability to generate actual-results/oddbyexample.xsd. I do not think that has anything to do with the changes here, which is confirmed by the fact that the exact same error occurs in the "released" branch.

Notes
[1] If you want schema assistance generating a <constraintDecl>, or just want a valid ODD once you have created one, use schemas generated from the TEI branch "sydb_issue_230_constraintDecl".

sydb added 2 commits October 24, 2024 19:59
 to XSL, and re-work how languages and Schematron Quick Fixes are handled in extract-isosch.xsl.
work with improved Schematron extraction routine. Test2/ seems to work, but
Test/ does not, however the problem does not seem to have anything to do
with Schematron extraction, and exists in the released branch as well.
@sydb sydb added conversion: schematron status: fixUntested Someone has checked in a fix that has been insufficiently tested. labels Oct 25, 2024
@sydb sydb added this to the Release 7.58.0 milestone Oct 25, 2024
@ebeshero ebeshero self-requested a review October 28, 2024 12:09
@HelenaSabel HelenaSabel merged commit 1652202 into dev Oct 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conversion: schematron status: fixUntested Someone has checked in a fix that has been insufficiently tested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants