-
Notifications
You must be signed in to change notification settings - Fork 127
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
ODD to Schematron conversion outputs only QuickFixes, no patterns #702
Comments
Thanks for the report. After poking a little, it seems like extract-isosch.xsl is doing the right thing — there are no patterns in English (they are in German), and by default (perhaps somewhat inappropriately) it looks for English. BUT when I specify German as the desired language P.S. Note that we do not expect extract-isosch.xsl to work entirely properly directly on tei_bkd.odd as I tried above, it is intended to be run on the “compiled” ODD generated from tei_bkd.odd + P5. |
So it looks to me at first blush like processed (or “compiled”) ODD is being created correctly, but the language is not being passed on to profiles/default/schematron/to.xsl when it is invoked. In turn, I am not sure it would pass the $lang on to extract-isosch.xsl even if it had it. OK. After poking around a bit more it looks like adding <param name="lang" expression="${lang}" if="lang"/> to the call to XSLT/trax in profiles/default/schematron/to.xsl (~line 31) fixes the problem and allows the language So that would seem to be the immediate fix to this problem. (Any chance you can test that, @jjarosch? I will try to test it more and make a PR later this weekend.) But it still strikes me that if every |
I’m not entirely sure I follow. When I change https://github.com/TEIC/Stylesheets/blob/dev/profiles/default/schematron/to.xsl like this:
– nothing changes. But is that what you meant in the first place? Regarding general behaviour: A message like “No language set, defaulting to en” might be a simple first prompt for users to realise that the A second thing that stands out to me is that the quick fixes are not checked for their language. |
Sorry, that was my fault, I listed the wrong file for the Yeah, I think your version of the message is mildly better, but we can worry about detailed wording later. The bigger question is whether we should presume that if there is no identifiable language for any constraints, they are all in English.
Oh bloody BLEEP, you are absolutely right. I will be gone most of today (doctor’s appointment) but hope to work on this ticket a bit tonight. |
Aah, yes, thanks, there’s the trax you mentioned. This
works for me – it generates a lot of constraints and the schema file works! Will the |
Oh, not sure. |
There’s no hurry on my end! Good luck at your appointment, and thanks again! |
to XSL, and re-work how languages and Schematron Quick Fixes are handled in extract-isosch.xsl.
It’s all looking good, it does what I expect. My colleague who wrote most of the schematron rules in our ODD had a look as well and didn’t spot any ‘semantic’ problems from the transformation. So this patch will resolve my issue. Thanks again!! |
Fixed via #704. Please be aware of TEIC/TEI#2608 |
bin/teitoschematron --odd tei_bkd.odd tei_bkd.sch
As the title says, the generated file entirely skips the patterns and only includes the quick fixes. Vaguely, this seems to point to this section being the cause or involved:
Stylesheets/odds/extract-isosch.xsl
Lines 311 to 354 in c07e8d6
Using TEI Garage, we get patterns (but no quick fixes) out of the same ODD. I understand TEI Garage uses this stylesheet: https://github.com/TEIC/Stylesheets/blob/dev/odds/extract-sch.xsl
Am I doing something wrong? Are there command line parameters to pass to
extract-isosch.xsl
?The text was updated successfully, but these errors were encountered: