W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2010

XProc Calabash: binding the xslt secondary output port

From: Manfred Staudinger <manfred.staudinger@gmail.com>
Date: Tue, 23 Nov 2010 00:43:56 +0100
Message-ID: <AANLkTinJOzeqZ10iepAr=SXPTF5jJBd94a7ZWFLonGkp@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

I have 2 xslt steps, say tr5-inst-nav and tr6-xforms-nav. The first
one takes a primary input and produces no "primary" but one or more
"secondary" output files using xsl:result-document. The (simplified)
pipeline looks like:

   <p:option name="rel-path" required="true"/>
   <p:option name="debug" select="'0'"/>
   <p:identity name="section_3"/>
   <p:xslt name="tr5-inst-nav">
      <p:with-param name="rel-path" select="$rel-path"/>
      <p:with-param name="test-dir" select="if ($debug=0) then () else
      <p:input port="stylesheet">
         <p:inline exclude-inline-prefixes="cx dwfx xps dwf">
<xsl:stylesheet version="2.0"
<xsl:param name="rel-path"/>
<xsl:param name="test-dir"/>
<xsl:template match="c:directory">
   <xsl:result-document href="{concat($out-dir, $sub, '-nav.xml')}">
         <p:pipe step="tr5-inst-nav" port="secondary"/>
      <p:store encoding="utf-8" indent="false" omit-xml-declaration="false">
         <p:with-option name="href" select="p:base-uri()"/>

This works perfectly, thanks Calabash! My second xslt (tr6-xforms-nav)
uses the same primary input, but in addition needs to read the files
produced by tr5-inst-nav using the doc() function. So I tried the

      <p:input port="source">
         <p:pipe step="section_3" port="result"/>
         <p:pipe step="tr5-inst-nav" port="secondary"/><!-- ??? -->
   <p:xslt name="tr6-xforms-nav">
      <p:with-param name="rel-path" select="$rel-path"/>
      <p:with-param name="test-dir" select="if ($debug=0) then () else

and got the error message

22.11.2010 11:21:57 com.xmlcalabash.util.DefaultXProcMessageListener error
SCHWERWIEGEND: step p:xslt named tr6-xforms-nav at file:/F:/...
1070:34: err:XD0008: More than one document in context for parameter
22.11.2010 11:21:57 com.xmlcalabash.drivers.Main error
SCHWERWIEGEND: It is a dynamic error if a document sequence appears
where a document to be used as the context node is expected.

(which might indicate another problem as well). Still I have no idea
how to make the secondary output port available for tr6-xforms-nav. If
you can see any other problems please feel free to comment.

Calabash version 0.9.22, Saxon-HE, Java version 1.6.0_14

Received on Monday, 22 November 2010 23:44:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:07 UTC