W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2011

Re: pxf:copy (Calabash)

From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
Date: Mon, 12 Dec 2011 15:30:05 +0100
Message-ID: <CAOCxfQfp-dwr3fMfh6z7bbEynkQOvusEaY+dmwzxuQ190obLmA@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 12 December 2011 14:30:55 GMT