using XProc and Calabash to process multiple files

My final goal is to process many Docbook instances and produce the FO using the Docbook XSL 2 Stylesheets.  My simple stepping stone that does not work was to run the identity Xproc step on multiple files.
It appears to run until right after it hits the last file in the first directory child of examples. I get output files to out corresponding to the input files. BUT I then get the following error and it chokes. If some kind soul would point me in the right direction I would really appreciate it. If for some reason extending this simple yet not yet working example to the pipeline docbook-xslt2-2.6.0/xslt/base/pipelines/db2fo.xpl will not work for some reason help there would be appreciated.

Environment info:
xmlcalabash-1.2.1-99.jar
OS X 10.14.6
java Corretto-8.232.09.2
saxon SaxonHE9-9-1-7J


build.xml:58: com.xmlcalabash.core.XProcException: Duplicate output binding for default output port.
 at com.xmlcalabash.util.UserArgs.addOutput(UserArgs.java:271)
 at com.xmlcalabash.drivers.CalabashTask.process(CalabashTask.java:1285)
 at com.xmlcalabash.drivers.CalabashTask.execute(CalabashTask.java:1201)
 at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:498)
 at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
 at org.apache.tools.ant.Task.perform(Task.java:350)
 at org.apache.tools.ant.Target.execute(Target.java:449)
 at org.apache.tools.ant.Target.performTasks(Target.java:470)
 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1388)
 at org.apache.tools.ant.Project.executeTarget(Project.java:1361)
 at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
 at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
 at org.apache.tools.ant.Main.runBuild(Main.java:834)
 at org.apache.tools.ant.Main.startAnt(Main.java:223)
 at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284)
 at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)

Total time: 11 seconds

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
  xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0">
  <p:input port="source"/>
  <p:output port="result"/>
  <p:identity/>
</p:declare-step>

Using an ant task

  <target name="test2Calabash">
      <calabash  includes="**/*.xml"
          basedir="${examples.dir}/"
          destdir="${generatedReports.dir}/out">
          <pipeline>
              <file file="${basedir}/XPROC/identity.xpl" />
          </pipeline>
      </calabash>
  </target>

Note for ant I did end up having to add a taskdef  since only adding typedef didn’t seem to do it for me.

<taskdef resource="com/xmlcalabash/antlib.xml">
      <classpath>
          <pathelement location="${deps.static}/xmlcalabash-1.2.1-99/xmlcalabash-1.2.1-99.jar"/>
      </classpath>
  </taskdef>

Received on Friday, 15 May 2020 22:02:35 UTC