Port declaration problem in Calabash


Can anybody explain the following to me:

I have a library containing the following pointless pipeline:

  <p:declare-step type="eb:copy">
        <p:input port="source"/>
        <p:output port="result"/>


And a similarly pointless pipeline in another file that uses it to copy 
all the XML files in one folder to another folder:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"

      <p:input port="source">

      <p:output port="result">
        <p:pipe step="finished" port="result"/>

  <p:import href="my-library.xpl" />

  <p:variable name="source-folder" select="'/some/source/folder'"/>
  <p:variable name="source-format" select="'xml'"/>
  <p:variable name="output-folder" select="'out'"/>

    <p:with-option name="include-filter" 
    <p:with-option name="path" select="$source-folder"/>

  <p:filter select="//c:file"/>
    <p:variable name="current-file-stem" 
      <p:with-option name="href" 
    <p:store name="store">
      <p:with-option name="href" 

  <p:identity name="finished">
     <p:input port="source">
             <p>Copy completed</p>


which works as expected: all the .xml files in /some/source/folder get 
copied to out and have '-copy' appended to their names.

However, if I add a parameter port to the eb:copy pipeline as follows:

  <p:declare-step type="eb:copy">
        <p:input port="source"/>
        <p:input port="parameters" kind="parameter"/>
        <p:output port="result"/>


and supply it with some input in my main pipeline:

      <p:input port="parameters">
          <c:data content-type="text/plain">foo</c:data>

Then only the first .xml file in the source folder is processed, and the 
pipeline fails with the following message:

Error  : Pipeline failed: err:XS0035: null  It is a static error if the 
declaration of a parameter input port contains a binding; parameter 
input port declarations must be empty.

Am I misunderstanding something, or is this a bug in Calabash (0.9.14)?

Hope someone can help!

Kevin Flynn

PS The eb:copy step is, of course, just a placeholder for "real" steps 
that do interesting stuff and actually need parameters...

Received on Wednesday, 5 August 2009 10:51:04 UTC