W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2012

Referencing an XProc variable in p:split-sequence/@test

From: Florent Georges <fgeorges@fgeorges.org>
Date: Mon, 7 May 2012 15:39:58 +0200
Message-ID: <CADyR_r3Hd5HT+gwZfPniiPPHVLj14_rttXpw3mg89jV87r7gsA@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

  I have the following pipeline, which returns as expected the
document with element 'one' as result:

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

       <p:input port="source" sequence="true" primary="true">

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

       <p:split-sequence test="name(/*) eq 'one'"/>


  If I replace the above split sequence step with the following (that
is, simply creating a variable to get the name of the element out of
the XPath expression itself):

    <p:variable name="elem" select=" 'one' ">
    <p:split-sequence test="name(/*) eq $elem"/>

then I get the following error:

    SEVERE: Underlying exception: net.sf.saxon.trans.XPathException:
    Undeclared variable in XPath expression: $elem

  From my reading, using an XProc variable in a p:split-sequence/@test
expression is allowed.  Did I miss something, or is it a bug in
Calabash? (latest Github content for Saxon 9.4+)


Florent Georges
Received on Monday, 7 May 2012 13:40:53 UTC

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