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

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 UTC