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

Re: Cardinality of inputs

From: Norman Walsh <ndw@nwalsh.com>
Date: Thu, 21 Jun 2007 07:47:19 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <873b0lr0l4.fsf@nwalsh.com>
/ "Innovimax SARL" <innovimax@gmail.com> was heard to say:
| On 6/7/07, Norman Walsh <ndw@nwalsh.com> wrote:
|> Right now, we have support for 1 or 0-or-more documents as input.
|> What's missing is support for 1-or-more and 0-or-1.
|> I can think of some reasons for 0-or-1 (an optional configuration
|> input, for example), but I can't think of any uses for 1-or-more.
| 0-or-1 is already in use in the spec : look at p:option/p:parameter
| but since zero is authorized, why an empty sequence wouldn't be
| authorized here ?

Options, parameters, (and xpath-context and viewport-source) are
special cases. You can't declare an atomic step such that it takes 0
or 1 documents on an "ordinary" input port. You can only say 1 or 0 or

You can pass an empty sequence to p:option and p:parameter. You can
pass an empty sequence to p:xpath-context too, but your expression
better return an empty node set. A p:viewport-source does require
exactly one document.

|> With that in mind, does anyone want to advance arguments for change
|> in this part of the spec?
| some DTD like
| (nothing) or cardinality=""      1-1
| cardinality="*"                      0-or-more
| cardinality="?"                      0-or-1
| cardinality="+"                     1-or-more

Yes, we could do that. I'd like to think of something more
user-friendly than "cardinality".

And are you arguing that we should do this, or only that we could?

                                        Be seeing you,

Norman Walsh <ndw@nwalsh.com> | Vision is the art of seeing things
http://nwalsh.com/            | invisible.-- Swift

Received on Thursday, 21 June 2007 11:47:24 UTC

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