Improve SQF and language handling of Schematron extraction process #704
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
<constraintDecl>
[1]<constraintDecl>
, have only<sch:ns>
children of it, or have both<sch:ns>
children and something else; maybe try it empty, too<schemaSpec>
,<elementSpec>
, and<attDef>
via@ns
<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
andmake 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".