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

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

From: Jostein Austvik Jacobsen <josteinaj@gmail.com>
Date: Tue, 16 Aug 2011 15:51:47 +0200
Message-ID: <CAOCxfQezJHsozPFOGavFE20zz__2GB=ZLBR--0PRnwtj7QCVPw@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Hi all.

I'm always excited when I come across a use-case that lets me use an XProc
step that I haven't used before, and today I tried p:split-sequence. It
seemed pretty straight forward, however I stumbled upon a problem right
away. This pipeline doesn't work:


<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="1.0">

    <p:input port="source" sequence="true">
        <p:inline>
            <doc/>
        </p:inline>
    </p:input>
    <p:output port="result" sequence="true"/>
    <p:option name="option" select="true()"/>

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

</p:declare-step>


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?


Regards
Jostein
Received on Tuesday, 16 August 2011 13:52:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 16 August 2011 13:52:34 GMT