Piperack: setting the base URI in p:for-each

Hi Norm,

When I install the pipeline below on Piperack (Calabash 1.0.18 with 
Saxon HE 9.5.1.6), I get this error:

com.xmlcalabash.core.XProcException: java.lang.IllegalArgumentException: 
Supplied base URI must be absolute
         at com.xmlcalabash.piperack.BaseResource.runPipeline(Unknown 
Source)
         at com.xmlcalabash.piperack.Run.post(Unknown Source)
         at 
org.restlet.resource.ServerResource.doHandle(ServerResource.java:621)
…………
Caused by: java.lang.IllegalArgumentException: Supplied base URI must be 
absolute
         at 
net.sf.saxon.s9api.XPathCompiler.setBaseURI(XPathCompiler.java:208)
         at com.xmlcalabash.runtime.XSelect.readSource(Unknown Source)
…………

It seems as if setting the base URI fails when making a document of  the 
iteration source.

Here’s the pipeline:

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 
xmlns:c="http://www.w3.org/ns/xproc-step"
   xmlns:cx="http://xmlcalabash.com/ns/extensions" version="1.0" 
name="split-docx_scan-dir">

   <p:output port="result" primary="true"/>

   <p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl"/>

   <p:identity>
     <p:input port="source">
       <p:inline>
         <doc xml:base="file:/C:/cygwin/home/gerrit">
           <elt name="a"/>
         </doc>
       </p:inline>
     </p:input>
   </p:identity>

   <cx:message>
     <p:with-option name="message"
       select="string-join(('CCCCCCCCCCCCCCCCC ', base-uri(/*), 
/*/*/name(), for $a in /*/*/@* return concat(name($a), '=', $a)), ' ' )"/>
   </cx:message>

   <p:for-each name="single-tree-iteration">
     <p:iteration-source select="/doc/elt"/>
     <cx:message>
       <p:with-option name="message" select="string-join(('in 
iteration')"> </p:with-option>
     </cx:message>
   </p:for-each>
</p:declare-step>

The output of the first message is:
Message: CCCCCCCCCCCCCCCCC  file:/C:/cygwin/home/gerrit elt name=a
It doesn’t get to the second message.

Gerrit


-- 
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsieke@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek,
Thomas Schmidt, Dr. Reinhard Vöckler

Received on Wednesday, 30 July 2014 07:42:32 UTC