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

Re: Proposal for p:split-sequence

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 07 Jun 2007 17:28:39 +0100
To: "Innovimax SARL" <innovimax@gmail.com>
Cc: "XProc WG" <public-xml-processing-model-wg@w3.org>
Message-ID: <f5bzm3b91ag.fsf@hildegard.inf.ed.ac.uk>

-----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 GMT

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