Closed cboulanger closed 1 month ago
sorry wrong XSLT file - it should of course be convert_tei-to-bibliographic-data-master/xslt/convert_tei-to-biblstruct_articles.xsl
Now the error is Error parsing XSLT file at lib/convert_tei-to-bibliographic-data-master/xslt/convert_tei-to-biblstruct_articles.xsl: xsl:when : could not compile test expression '@type = ('section', 'item')'
I understand now that this repo depends on other repos of yours, such as https://github.com/OpenArabicPE/authority-files - it would be great if you added the list of dependencies to the documentation. When I run the demo script, I get I/O error reported by XML parser processing file:/<snip>/convert-anystyle-data/xslt-calendar-conversion/functions/date-functions.xsl. Caused by java.io.FileNotFoundException: /<snip>/convert-anystyle-data/xslt-calendar-conversion/functions/date-functions.xsl (No such file or directory)
- where do I find xslt-calendar-conversion
?
From our conversion on Mastodon, for the record:
I've tried it directly with saxon and the xslt hosted on GitHub, but no luck yet:
$saxon -s:"tei/10.1111_1467-6478.00057.xml" -xsl:"https://openarabicpe.github.io/convert_tei-to-bibliographic-data/xslt/convert_tei-to-biblstruct_bibl.xsl"
Error on line 6 column 88 of functions.xsl:
XTSE0165 I/O error reported by XML parser processing
https://openarabicpe.github.io/../xslt-calendar-conversion/functions/date-functions.xsl.
Caused by java.io.IOException: Server returned HTTP response code: 400 for URL:
https://openarabicpe.github.io/../xslt-calendar-conversion/functions/date-functions.xsl
I/O error reported by XML parser processing https://openarabicpe.github.io/../xslt-calendar-conversion/functions/date-functions.xsl
I updated the schema of the source TEI. An example is here. The error remains, unfortunately.
After your fixes, I got it to work using Saxon, as documented here: https://gitlab.gwdg.de/boulanger/experiments/-/blob/main/convert-anystyle-data/tei-to-bibformats.ipynb , If I understand correctly, lxml doesn't work because the stylesheets use xslt-2.0 features.
Using the XSLTs in this repo, I am trying to convert TEI documents containing
<bibl>
elements to<biblStruct>
for further processing.Here is an example of my data:
I am using the following python code:
Running the code, I get
When I open the file in my IDE, it displays many errors, such as
Also, the imports
are not resolved: the second one seems to be an invalid path outside the repo, the first one also displays a non-resolvable although if interpreted as a relative path, it should resolve.
Any idea what could be the problem?