- From: <vojtech.toman@emc.com>
- Date: Mon, 20 Dec 2010 03:51:10 -0500
- To: <xproc-dev@w3.org>
The context should exist in this case, IMHO, because of the p:pipe binding. What if you try this expression instead: xs:string(/c:result) Does it get any better? Vojtech -- Vojtech Toman Consultant Software Engineer EMC | Information Intelligence Group vojtech.toman@emc.com http://developer.emc.com/xmltech > -----Original Message----- > From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On > Behalf Of Florent Georges > Sent: Monday, December 20, 2010 12:44 AM > To: XProc Dev > Subject: Initializing a variable using an output port > > Hi, > > 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"/> > </p:with-option> > </pxp:unzip> > ... > > 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:group> > <p:variable name="file" select="/xs:string(c:result)"> > <p:pipe step="store" port="result"/> > </p:variable> > <pxp:unzip ...> > <p:with-option name="href" select="$file"> > </pxp:unzip> > ... > </p:group> > > 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? > > Regards, > > -- > Florent Georges > http://fgeorges.org/ >
Received on Monday, 20 December 2010 08:52:32 UTC