W3C home > Mailing lists > Public > xproc-dev@w3.org > June 2009

option scope question

From: James Sulak <jsulak@gmail.com>
Date: Sun, 28 Jun 2009 19:52:28 -0500
Message-ID: <7cb78b3b0906281752v1ef98126gc9ccfc340b160357@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Hello all,

When I execute the following pipeline, I get "err:XD0026: Undeclared
variable in XPath expression: $foo."  I'm not sure why.  My
understanding is that $foo should remain in scope for the entire step.
 But this pipeline is a bit atypical in that it has no input port, and
then uses an inline document inside of a p:identity as a fixed

Is this a bug, or am I missing something?



<p:declare-step xmlns:p="http://www.w3.org/ns/xproc">

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

  <p:option name="foo" select="'data'"/>

    <p:input port="source">
        <root>This is some text.</root>

  <p:string-replace match="root//text()" replace="replace(., 'text', $foo)"/>

Received on Monday, 29 June 2009 00:53:08 UTC

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