W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > June 2007

Re: Proposal for p:split-sequence

From: Jeni Tennison <jeni@jenitennison.com>
Date: Thu, 07 Jun 2007 21:17:43 +0100
Message-ID: <466867E7.7050605@jenitennison.com>
To: XProc WG <public-xml-processing-model-wg@w3.org>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:53 GMT