Re: Cardinality of inputs & outputs

/ Jeni Tennison <jeni@jenitennison.com> was heard to say:
| We currently say:
|
|   On compound steps and p:declare-step, an input declaration can
|   indicate if a sequence of documents is allowed to appear on the port.
|   If sequence is specified with the value yes, then a sequence is
|   allowed. If sequence is not specified on p:input, or has the value
|   no, then it is a dynamic error (err:XD0006) for a sequence of more
|   than one document to appear on the declared port.
|
| Does that mean that given:
|
|   <p:input port="preprocess" sequence="no" />
|
| I can bind the preprocess input port to zero documents?

As Mohamed suggested, I think that should read 

   If sequence is not specified on p:input, or has the value no,
   then it is a dynamic error (err:XD0006) unless exactly one document
   appears on the declared port.

| I wonder whether we should have the capability to constrain ports to
| say they expect/produce zero-or-one, exactly-one, zero-or-more and
| one-or-more.
|
| If we don't, I think we need a note or something just to make explicit
| that input ports with sequence="no" can accept zero documents.

I think we want to distinguish the case of exactly one document. If you
really think we need to distinguish the case of zero-or-one document,
then I think I'm inclined to be specific about it:

  sequence = one | zero-or-more | one-or-more | zero-or-one

But I'm not entirely convinced we need to do that.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | You cannot step twice into the same
http://nwalsh.com/            | river, for other waters are continually
                              | flowing in.-- Heraclitus

Received on Tuesday, 22 May 2007 20:49:39 UTC