MorganaXProc-IIIse XSLTConnector or XSLTConnector error

103 Views Asked by At

I'm using MorganaXProc-IIIse (XPROC 3.0) to execute the following code:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
    <p:output port="result"/>
    <p:xslt name="xml-author_list">
        <p:with-input port="source">
            <p:document href="content.xml"/>
        </p:with-input>
        <p:with-input port="stylesheet">
            <p:document href="test.xsl"/>
        </p:with-input>
    </p:xslt>
</p:declare-step>

However, I get the following error message:

Check your configuration: Cannot initialize XSLTConnector with 'com.xml_project.morganaxproc3.saxon10connector.Saxon10XSLTConnector'.    
<c:errors xmlns:c="http://www.w3.org/ns/xproc-step">
       <c:error code="err:XC0038"
                name="xml-author_list"
                type="p:xslt"
                href="file:///Users/bob/Dev/Workspace/IdeaProjects/test/test/test.xpl"
                line="4"
                column="36"
                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>

So I tried change the XSLTConnector to Saxon10. The Saxon10Connector is already in the lib directory of Morgana. Here is my config.xml:

<morgana-config xmlns="http://www.xml-project.com/morganaxproc">
    <path_to_iso_skeleton_schematron_1>ISO_SKELETON_SCHEMATRON_1</path_to_iso_skeleton_schematron_1>
    <path_to_iso_skeleton_schematron_2>ISO_SKELETON_SCHEMATRON_2</path_to_iso_skeleton_schematron_2>
    <path_to_SchXSLT_1>schxslt-1.4.5-sources/xslt/1.0</path_to_SchXSLT_1>
    <path_to_SchXSLT_2>schxslt-1.4.5-sources/xslt/2.0</path_to_SchXSLT_2>
    <XSLTValidationMode>STRICT</XSLTValidationMode>
    <xslt-connector>Saxon10</xslt-connector>
</morgana-config>

And then I execute:

sh Morgana.sh /Users/bob/Dev/Workspace/IdeaProjects/test/test/test.xpl -xslt-connector=saxon10 -xquery-connector=saxon10 -indent-errors -debug

But the error still occurs. I cannot find any information about which XSLTConnector supports XSL-Stylesheet Version 3.0

Any hint is highly appreciated.

1

There are 1 best solutions below

2
0x44656E6E79 On

If you read the documentation it says:

The current search order for a Saxon implementation is saxon9ee.jar, saxon9pe.jar, saxon9he.jar, saxon-ee-10.0.jar, saxon-pe-10.0.jar, saxon-he-10.0.jar, saxon-ee-10.1.jar, saxon-pe-10.1.jar and saxon-he-10.1.jar. MorganaXProc-IIIse will use the first Saxon version found by this search order.

But since the recommended Saxon Version for Saxon 10 is Saxon 10.3:

Recommened to be used with Saxon 10.3

one can assume that it will work with 10.3 as well as with any new release.

However, with 10.3 and 10.6 I still got the same error. I assumed maybe there is a Saxon 9.x Version in the lib folder and therefore selecting the wrong version due to the search order. But that wasn't the case.

When I added 10.0 like mentioned in the search order, it works.