I'm trying to translate my batch file calling the Saxon (version 8.9) into a XProc pipeline (Calabash). This is my batch call:
java -jar saxon8.jar -o out.xml in.xml style.xsl +config=config-file.cfg
The parameter config is defined in the stylesheet in this way:
<xsl:param name="config" as="document-node()"/>
The XProc part looks like this:
<p:load name="configLoad">
<p:with-option name="href" select="'config-file.cfg'"/>
</p:load>
<p:xslt name="config">
<p:input port="source">
<p:document href="in.xml"/>
</p:input>
<p:input port="parameters">
<p:inline>
<c:param name="config">
<p:pipe port="result" step="configLoad"/>
</c:param>
</p:inline>
</p:input>
<p:input port="stylesheet">
<p:document href="style.xsl"/>
</p:input>
</p:xslt>
The error message is this:
Required item type of value of variable $config is document-node(); supplied value has item type xs:string
I know the <p:exec>
step but i don't want to use it, because the config-file shall be generated by other XSLT tranformations later. It shall also be reused by other XProc steps.
Is there a possibility to call the XSLT stylesheet with the correct parameter type? Thanks for your help!