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

Re: p:split-sequence gives "Undeclared variable in XPath expression"

From: Florent Georges <fgeorges@fgeorges.org>
Date: Tue, 16 Aug 2011 16:05:36 +0200
Message-ID: <CADyR_r3nbvCqPdeNEFj517iO2nCPZqNk=8deWjmakDXfyYqM0Q@mail.gmail.com>
To: Jostein Austvik Jacobsen <josteinaj@gmail.com>
Cc: XProc Dev <xproc-dev@w3.org>
On 16 August 2011 15:51, Jostein Austvik Jacobsen wrote:


>     <p:split-sequence test="$option"/>

> This fails with the message "Undeclared variable in XPath
> expression: $option".  If I replace test="$option" with either
> test="true()" or test="position()=1" it works.  But when I
> introduce a variable or option into the test, it fails.  So
> what am I missing here?

  The *value* of the test option is defined to be an XPath
expression, evaluated at some point by the processor.  This is
different than an XPath expression evaluated by the processor at
the lexical point where it appears (for instance when using
p:with-option).  Compare it to:

       <p:with-option name="test" select="'true()'"/>


Florent Georges
Received on Tuesday, 16 August 2011 14:06:33 UTC

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