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
"faux-input."

Is this a bug, or am I missing something?

Thanks,

-James


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

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

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

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

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

</p:declare-step>
Received on Monday, 29 June 2009 00:53:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 29 June 2009 00:53:09 GMT