Menu

#120 Errors when using Saxon versions after 10.5

closed
nobody
None
2022-12-09
2022-11-30
No

We were recently testing Morgana III in an environment where the default Saxon was 10.8, and were not able to get it to work; rolling back to 10.5 solved the problem. If you're aware of this and it's in the plan to add support for later versions of Saxon (especially 11.x), then this isn't an important issue, but if it's unexpected, I'm happy to re-run tests and provide the error messages.

Discussion

  • xml-project.com

    xml-project.com - 2022-11-30

    Hi Martin,
    yes, this is indeed unexpected as my standard testing config uses Saxon-HE 10.8. I would be happy if you could provide the error messages, so I am able to fix the problem.
    Thanks in advance,
    Achim

     
  • Geert B

    Geert B - 2022-11-30

    if this would help, I am using Saxon-EE 10.8 by default, no issues either
    (morgana III both se and ee, windows 10, java 11)

     

    Last edit: Geert B 2022-11-30
  • Martin Holmes

    Martin Holmes - 2022-11-30

    Will do, ASAP. :-)

     
  • Martin Holmes

    Martin Holmes - 2022-11-30

    When I switch in Saxon 10.8 to replace 10.5, I get this initial error message:

     <c:errors xmlns:c="http://www.w3.org/ns/xproc-step"><c:error code="err:XC0038" name="!1.1" type="p:xslt" href="file:/home/mholmes/tei/atop/Util/steps/legacy-odd2odd.xpl" line="8" column="115" xmlns:p="http://www.w3.org/ns/xproc" xmlns:err="http://www.w3.org/ns/xproc-error"><message>Requested XSLT version '2.0' is not supported by choosen XSLTConnector or XSLTConnector configuration error.</message></c:error></c:errors>
         [java] Check your configuration: Cannot initialize XSLTConnector with 'com.xml_project.morganaxproc3.saxon10connector.Saxon10XSLTConnector'.
    

    If I switch the XSLT version in the relevant file to 3.0, I get this:

    <c:errors xmlns:c="http://www.w3.org/ns/xproc-step"><c:error code="err:XC0038" name="!1.1" type="p:xslt" href="file:/home/mholmes/tei/atop/Util/steps/legacy-odd2odd.xpl" line="8" column="115" xmlns:p="http://www.w3.org/ns/xproc" xmlns:err="http://www.w3.org/ns/xproc-error"><message>Requested XSLT version '3.0' is not supported by choosen XSLTConnector or XSLTConnector configuration error.</message></c:error></c:errors>
         [java] Check your configuration: Cannot initialize XSLTConnector with 'com.xml_project.morganaxproc3.saxon10connector.Saxon10XSLTConnector'.
    

    This is the entirety of the XPL file:

    <p:declare-step version="3.0" type="atop:legacy-odd2odd"
                    xmlns:atop="http://www.tei-c.org/ns/atop"
                    xmlns:p="http://www.w3.org/ns/xproc">
    
      <p:input  port="source"/>
      <p:output port="result"/>
    
      <p:xslt parameters="map{'defaultSource': resolve-uri('../../Tests/resources/p5subset.xml', static-base-uri())}">
        <p:with-input port="stylesheet" href="../../XSLT/legacy-odd2odd.xsl"/>
      </p:xslt>
    
    </p:declare-step>
    

    Is there something I'm missing here?

     
  • xml-project.com

    xml-project.com - 2022-12-01

    Hi Martin,
    I am not able to reproduce this problem from the pipeline and an random xlst with "version='2.0'".
    My guess is that it is a configuration problem so that MorganaXProc-III is no able to find (the right) Saxon. If you use a batch file to start MorganaXProc, make sure Saxon is the first on classpath. If you use MorganaXProc's plug-in modus, make sure that there is only one instance of Saxon in folder "MorganaXProc-IIIse_lib".
    Does this help?
    Greetings from Germany,
    Achim

     
  • Martin Holmes

    Martin Holmes - 2022-12-01

    The process is invoked from Ant:

    <target name="transpileMorgana2" description="Run the experimental transpiler through Morgana">
        <mkdir dir="output"/>
        <echo message="Processing ${oddName}.odd to output/${oddName}.rng"/>
        <java failonerror="true" fork="true" jar="${basedir}/Lib/morgana/MorganaXProc-IIIse.jar" dir="${basedir}">
          <arg value="-config=${basedir}/Lib/morgana/config.xml"/>
          <arg value="${basedir}/Util/pipeline.xpl"/>
          <arg value="-option:teiOddSpecification=${inputTestOdd}"/>
          <arg value="-output:result=${basedir}/output/${oddName}.rng"/>
        </java>
        <jing rngfile="Schemas/relaxng.rnc" compactsyntax="true">
          <fileset file="output/${oddName}.rng"/>
        </jing>
      </target>
    

    This is the content of the MorganaXProc-IIIse_lib folder:

    commons-codec-1.11.jar    httpcore-4.4.12.jar             javax.mail-1.6.2.jar              Saxon10Connector.jar
    commons-lang3-3.12.0.jar  httpmime-4.5.10.jar             jing.jar                          Saxon99Connector.jar
    commons-logging-1.2.jar   jackson-annotations-2.13.3.jar  json-schema-validator-1.0.72.jar  saxon-he-10.8.jar
    guava-23.0.jar            jackson-core-2.13.3.jar         kryo-4.0.1.jar                    slf4j-api-2.0.0-beta1.jar
    htmlparser-1.4.15.jar     jackson-databind-2.13.3.jar     quasar-actors-0.7.9.jar           slf4j-nop-2.0.0-beta1.jar
    httpclient-4.5.10.jar     javax.activation-api-1.2.0.jar  quasar-core-0.7.9.jar             xmlresolver-4.5.1.jar
    

    and this is what's in the config.xml:

    <morgana-config xmlns="http://www.xml-project.com/morganaxproc">
      <path_to_SchXSLT_1>../schxslt/xslt/1.0</path_to_SchXSLT_1>
      <path_to_SchXSLT_2>../schxslt/xslt/2.0</path_to_SchXSLT_2>        
      <XSLTValidationMode>LAX</XSLTValidationMode>
      <xslt-connector>Saxon10</xslt-connector>
      <xquery-connector>Saxon10</xquery-connector>
      <schematron-connector>SchXSLT</schematron-connector>
    </morgana-config>
    

    Swapping the Saxon 10.8 for 10.5 fixes the problem. Is there anything in this setup that you think could be causing it?

     
  • xml-project.com

    xml-project.com - 2022-12-09

    Hi Martin,
    sorry for being late. I think the problem comes up from your ANT-java call. By using "jar" you rely on the manifest inside the jar. This is no longer supported, in fact it was supported until Saxon-10-5. I abandoned this mechanism some time ago in favor of the new plug-in mechanism. To use this from ant, the following works for me:

    <java failonerror="true" fork="true" classname="com.xml_project.morganaxproc3.XProcEngine" dir="${basedir}">
                <classpath>
                    <pathelement location="${morgana-path}/MorganaXProc-IIIse.jar"/>
                    <pathelement location="${morgana-path}/MorganaXProc-IIIse_lib/*" />
                </classpath>
    

    This puts all jar in MorganaXProc-IIIse_lib on the class path, so if Saxon 10.8 is in this folder, it is correctly found.
    Hope this is helpful.
    Greetings from Germany,
    Achim

     
  • Martin Holmes

    Martin Holmes - 2022-12-09

    Thanks Achim, that works perfectly!

     
  • Martin Holmes

    Martin Holmes - 2022-12-09

    I don't seem to have privileges to close the ticket, so please go ahead and close it.

     
  • xml-project.com

    xml-project.com - 2022-12-09
    • status: open --> closed