1

Environment: eXist 4.2.1 - xquery 3.1 - xslt 3.0 - TEI-XML document

Using the eXide interface, I am attempting to do a transformation of a TEI-XML document with an XSL file, with an output of HTML.

Until now I have been developing XML documents and their XSL transformations in Oxygen. Firing off the transformations in Oxygen or using a terminal, both have been working error free. Now I am preparing a web application using eXist (which will contains the thousands of TEI-XML docs).

I am trying to simply fire off the same transformation in eXist with the following xquery test:

let $result := transform:transform(doc("xmldb:exist://db/apps/deheresi/resources/documents/ms609_0001.xml"), doc("xmldb:exist://db/apps/deheresi/resources/documents/document_style.xsl"), ())

return $result?output

eXide returns me only this:

exerr:ERROR Unable to set up transformer: Stylesheet compilation failed: 62 errors reported [at line 3, column 16]

I'm new at eXist DB and have not been able to figure out how to get the reasons for errors.

  1. How do I access the error details (detail log?) in eXist? (I have searched without success my books and online documentation; for example https://exist-db.org/exist/apps/doc/xsl-transform doesn't help at all on errors).

  2. For Oxygen and terminal transformations, I use Saxon 9he. I understand that eXist uses the same?

NB: my documents are all organized in an eXist collection identical to the setup on my computer, thus all relative locations should function correctly?

jbrehr
  • 775
  • 6
  • 19

1 Answers1

3

First - when using doc and collection functions for the paths in the database you don't need the XML:DB URI, instead you can just use:

transform:transform(doc("/db/apps/deheresi/resources/documents/ms609_0001.xml"),
        doc("/db/apps/deheresi/resources/documents/document_style.xsl"), ())

The errors should be in exist.log the default location for that is $EXIST_HOME/webapp/WEB-INF/logs. You might otherwise find them on the "Standard Out" of the terminal session which is running eXist-db.

If you are using the YAJSW (Service Wrapper) to run eXist-db you might also need to check $EXIST_HOME/tools/yajsw/logs.

adamretter
  • 3,885
  • 2
  • 23
  • 43
  • Thanks Adam. Your book is at my side as I try to learn eXist. Does Exist support XSLT 3.0? When I look at the transformer settings in the `conf.xml` file I see only support for 1. 0 and 2.0. – jbrehr Oct 10 '18 at 11:23
  • The `exist.log` shows errors due to Saxon processing XSL 2.0: my XSL file is 3.0. I get the identical errors in Oxygen if I downgrade the XSL stylesheet to 2.0. Is eXist able to support XSL 3.0? – jbrehr Oct 10 '18 at 11:31
  • 2
    @jbrehr, https://github.com/eXist-db/exist/tree/eXist-4.2.1/lib/endorsed suggests your version of eXist comes with Saxon 9.6 HE, that version doesn't support XSLT 3, the version 9.8 or 9.9 HE is needed for that. But I can't tell you whether it suffices to simply drop the current version of the Saxon HE jar file into your eXist library directory to have eXist work properly with Saxon 9.8 or 9.9. – Martin Honnen Oct 10 '18 at 11:47
  • 1
    No unfortunately it is not possible to drop-in a newer version. The Betterform library expects a specific Saxon version to be present. – DiZzZz Oct 10 '18 at 12:57
  • eXist 5.0.0-RC series has Saxon 9.8 HE – adamretter Oct 10 '18 at 15:31
  • 1
    So yes eXist 5 supports XSLT 3 – adamretter Oct 10 '18 at 15:32