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

ODD to ISO Schematron conversion fails after TEI P5 4.9.0 update #121

Open
SebastianKohler opened this issue Feb 5, 2025 · 4 comments
Open
Assignees

Comments

@SebastianKohler
Copy link

Since TEI P5 was updated to version 4.9.0 and the stylesheets to 7.58.0 I'm unable to convert my TEI customization from an ODD document to ISO Schematron constraints.

TEIGarage gives the following error message:

Error: class pl.psnc.dl.ege.exception.ConverterException
Errors were reported during stylesheet compilation

The ODD document is valid and I can convert it to a compiled ODD document with TEIGarage without errors. The compiled ODD is, however, not valid because the xml:base attribute on the document root is empty:

<TEI xmlns="http://www.tei-c.org/ns/1.0" xml:base="">

Oxygen informs me that

value of attribute "xml:base" is invalid; must be a URI matching the regular expression "\S+"

I can convert my ODD document to an XSD schema without errors, and the schema works as intended. It's just that the conversion to Schematron fails.

How can I find out if there is an issue in my ODD, or is there an issue in the updated stylesheets that TEIGarage uses?

@anneferger anneferger self-assigned this Feb 5, 2025
@anneferger
Copy link
Contributor

Thank you for opening this issue, I will have a look into it

@peterstadler
Copy link
Member

I'm not sure but I was recently facing a similar(?) error with the odd2schematron conversion: TEIC/Stylesheets#729

@SebastianKohler could you try to transform your ODD on the command line and report your findings (along with your Saxon version)? Or could you share your ODD file for us to test?

@SebastianKohler
Copy link
Author

@peterstadler My ODD file is here: https://github.com/slsfi/digital-edition-xml-resources/blob/main/tei-odd/tei_sls_master.odd

I appreciate if you could test it. I tried to transform it using https://github.com/TEIC/Stylesheets/blob/dev/odds/extract-isosch.xsl in Oxygen (Saxon-EE 12.3) and got an error from line 143 in the xsl-file: Internal fatal ERROR: Unable to determine the language (i.e., @xml:lang) of any constraints..

@peterstadler
Copy link
Member

So, here are my findings:

  1. converting your ODD to a compiled ODD via TEIGarage: works!
  2. extracting ISO Schematron constraints with Saxon9 and current dev version of Stylesheets
# java -jar ~/lib/saxon9he/saxon9he.jar -s:/Users/pstadler/Downloads/tei_sls_master.xml -xsl:/Users/pstadler/repos/Stylesheets/odds/extract-isosch.xsl              ~/Downloads
Static error at xsl:template on line 464 column 94 of extract-isosch.xsl:
  The path in a pattern must contain simple steps
Errors were reported during stylesheet compilation

does not work!
3. extracting ISO Schematron constraints with Saxon12 and current dev version of Stylesheets (and adding a language parameter)

java -jar ~/lib/SaxonHE12-5J/saxon-he-12.5.jar -s:/Users/pstadler/Downloads/tei_sls_master.xml -xsl:/Users/pstadler/repos/Stylesheets/odds/extract-isosch.xsl lang=en

works!

So, the quick fix for you @SebastianKohler might be to add the lang parameter to your transformation in Oxygen.

For the TEIGarage it seems we'll need to strive for a Saxon update.

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

No branches or pull requests

3 participants