Brown-University-Library / usepweb_project

MIT License
0 stars 5 forks source link

Transformation using latest EpiDoc stylesheets causes XSL processor error #74

Closed emylonas closed 3 years ago

emylonas commented 3 years ago

We have replaced the XSL scripts used to format the inscriptions with the latest version, as the ones we were using were about 5 or more years old.

When I run the transformation in Oxygen, it works: Ex: XML file transcribed/MA.Glouc.HCM.L.Tmp97.6.54/ and xsl usep-data/resources/xsl/epidoc-xsl-p5/start-txt.xsl

When you try the same thing on the web, going to https://usepigraphy.brown.edu/projects/usep/inscription/MA.Glouc.HCM.L.Tmp97.6.54/

nothing loads, and if you check the console log, you see that there is an xsl error.

19969A4E1BAF2CE01CE393669CA7071E.cache.html:875 SaxonCE.StandardErrorListener 19:26:15.414
SEVERE: Error at /xsl:stylesheet/xsl:template[4]/xsl:variable[7] in https://usepigraphy.brown.edu/usep_data/resources/xsl/epidoc-xsl-p5/htm-tpl-sqbrackets.xsl
  XPST0017 XPath syntax error near {...entbrackettypes//text()),']...}:
    Function string-join() must have 2 arguments

You can go and look at the file - however, I think that there is no XSL syntax error, but rather that the problem may be with SaxonCE, as this works in Oxygen and also for many other people using these scripts.

In addition, it turns out that SaxonCE hasn't been supported since 2017, and has been superceded by Saxon-JS (which may be faster as well)

We may want to consider upgrading our XSL processor - I don't know how long it will take, but we are unable to run the lastest Epidoc scripts which generate a greatly improved display.

emylonas commented 3 years ago

This has been temporarily addressed as follows: The problem was that SaxonCE, with its XSL2.0 processor expects the XPath function string-join() to have two arguments, whereas XSL3.0 processor accepts one or two arguments. We have added an empty second argument to the string-join() functions that were failing, and everything is displaying as it should (so far). So, we can continue with SaxonCE for now, but this should be looked at eventually.

emylonas commented 3 years ago

fixed by editing Epidoc stylesheets. closing