Re: pxf:copy (Calabash)

By the way; using XML Calabash v0.9.41.

Jostein

2011/12/12 Jostein Austvik Jacobsen <josteinaj@gmail.com>

> I can't get pxf:copy working properly if I use "href" as the variable name
> for the target option. If I do, the file referenced in the href *option* is
> overwritten with an empty file.
>
> Here's the pipeline (example fileset (debug.xpl+image.png) also attached
> as a ZIP):
>
>
> --------------------------------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <p:declare-step version="1.0" xmlns:p="http://www.w3.org/ns/xproc"
> xmlns:pxf="http://exproc.org/proposed/steps/file">
>
>     <p:import href="http://xmlcalabash.com/extension/steps/library-1.0.xpl
> "/>
>
>     <p:declare-step type="pxf:copy">
>         <p:output port="result" primary="false"/>
>         <p:option name="href" required="true"/>
>         <p:option name="target" required="true"/>
>         <p:option name="fail-on-error" select="'true'"/>
>     </p:declare-step>
>
>     <p:group>
>         <p:variable name="from" select="'image.png'"/>
>         <p:variable name="to" select="'image-copy.png'"/>
>         <p:variable name="href" select="'image-copy.png'"/>
>
>         <!-- This works -->
>         <!--<pxf:copy name="copy">
>             <p:with-option name="href" select="$from"/>
>             <p:with-option name="target" select="$to"/>
>         </pxf:copy>-->
>
>         <!-- This does not work -->
>         <pxf:copy name="copy">
>             <p:with-option name="href" select="$from"/>
>             <p:with-option name="target" select="$href"/>
>         </pxf:copy>
>     </p:group>
>
> </p:declare-step>
>
> --------------------------------------------------------------------------------
>
>
> My ~/.calabash file  contains the following:
>
>
> --------------------------------------------------------------------------------
> <?xml version="1.0"?>
> <xproc-config xmlns="http://xmlcalabash.com/ns/configuration" xmlns:pxf="
> http://exproc.org/proposed/steps/file">
>     <implementation type="pxf:copy"
> class-name="com.xmlcalabash.extensions.fileutils.Copy"/>
> </xproc-config>
>
> --------------------------------------------------------------------------------
>
>
> Bug?
>
> Regards
> Jostein
>

Received on Monday, 12 December 2011 14:30:54 UTC