Re: Proposal for p:split-sequence

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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"/>

ht
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFGaDI3kjnJixAXWBoRAlpUAJ90Zs61UyFKIXhmliXmsMlB2MDfLQCfW6OD
v/dPqLIlrzmj4QS1+fzimcs=
=sBlg
-----END PGP SIGNATURE-----

Received on Thursday, 7 June 2007 16:28:44 UTC