Re: Proposal for p:split-sequence

Henry S. Thompson wrote:
> Innovimax SARL writes:
> 
>> <p:declare-step type="p:split-sequence">
>>     <p:input port="source" sequence="yes"/>
>>     <p:output port="result" sequence="yes"/>
>>     <p:output port="secondary" sequence="yes"/>
>>     <p:option name="test" required="yes"/>
>> </p:declare-step>
>>
>> output to the !result until $test is false, then it will output the
>> rest of the sequence to !secondary
> 
> I like this, further to our discussion just now.
> 
> Provided we agree the semantics of position() in XPath expressions
> evaluated by steps with sequence inputs, and further agree that we
> will implement last() 'correctly' in the same cases, I propose we
> adopt this, and remove p:matching-documents, p:head and p:tail.
> 
> <p:head count="n"/> becomes <p:split-sequence test="position()<=n"/>
> <p:tail count="n"/> becomes <p:split-sequence test="last()-position()<=n"/>

Looks good to me, but can we call the ports 'pass' and 'fail' or 
'true-result' and 'false-result'?

Jeni
-- 
Jeni Tennison
http://www.jenitennison.com

Received on Thursday, 7 June 2007 20:17:45 UTC