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

Re: p:input doppelgangers

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Thu, 05 Jul 2007 10:00:23 +0100
To: Norman Walsh <ndw@nwalsh.com>
Cc: public-xml-processing-model-wg@w3.org
Message-ID: <f5bvecz5ioo.fsf@hildegard.inf.ed.ac.uk>

Hash: SHA1

Norman Walsh writes:

> |  p:iteration-source
> |    (p:empty | (p:pipe | p:document | p:inline )+ )?
> |
> |    That is, exactly as p:input, because p:for-each is like a step with
> |    sequence in and out, and should be allowed to be forced to iterate
> |    no times and produce an empty sequence.
> What's the point of writing a loop that explicitly iterates 0 times?
> Putting p:empty seems entirely pointless to me and more likely an
> error than not.

Well, it's not an error to get an empty sequence coming in from a
pipe, is it?  This is certainly not a big deal, I just think the fewer
exceptions to the general rule the better -- p:empty is almost always
going to be a corner case.

- -- 
 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]
Version: GnuPG v1.2.6 (GNU/Linux)

Received on Thursday, 5 July 2007 09:00:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:43 UTC