XSLT with XProc - parameter binding in the required type -


i'm trying translate batch file calling saxon (version 8.9) xproc pipeline (calabash). batch call:

java -jar saxon8.jar -o out.xml in.xml style.xsl +config=config-file.cfg 

the parameter config defined in stylesheet in way:

<xsl:param name="config" as="document-node()"/> 

the xproc part looks 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 this:

required item type of value of variable $config document-node(); supplied value has item type xs:string

i know <p:exec> step don't want use it, because config-file shall generated other xslt tranformations later. shall reused other xproc steps.

is there possibility call xslt stylesheet correct parameter type? help!

looks out of luck current xproc standard. states parameters name/value pairs data type of values must string of untypedatomic. don't ask me why..

http://www.w3.org/tr/xproc/#parameters

if won't composing contents of configuration dynamically, merely passing around contents of fixed files, pass through path appropriate config file, , use fn:doc() read within xslt files.

i'd recommend against writing config files on fly. execution order within xproc may not sequentially might expect..

alternative pass through each config setting separate parameter, each setting still have comply flat parameter value type..

hth!


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -