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

Initializing a variable using an output port

From: Florent Georges <fgeorges@fgeorges.org>
Date: Mon, 20 Dec 2010 00:44:01 +0100
Message-ID: <AANLkTimDycze=FPiSWy7U0v4z_VZ=mvoT3mJYhbswtzy@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

  I store a binary file, using p:store and a Calabash extension
to be sure the Base 64 is decoded.  That part works perfect:

    <p:store name="store" cx:decode="true" .../>

  This file is a ZIP file.  I then use the EXProc extension step
pxp:unzip to get an XML entry out of this ZIP file:

    <p:store name="store" .../>
    <pxp:unzip ...>
       <p:with-option name="href" select="/xs:string(c:result)">
          <p:pipe step="store" port="result"/>

  That works well.  The p:store returns a document that looks
like <c:result>file:/...</c:result>, which is used when computing
the href option.  But I need to use this file name several times,
so I store it instead in a variable:

    <p:store name="store" .../>
       <p:variable name="file" select="/xs:string(c:result)">
          <p:pipe step="store" port="result"/>
       <pxp:unzip ...>
          <p:with-option name="href" select="$file">

  But then I receive the following dynamic error (from Calabash):
"Expression refers to context when none is available:
/xs:string(c:result)".  I thought both constructions above were
equivalent.  What did I miss?


Florent Georges
Received on Sunday, 19 December 2010 23:44:54 UTC

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