Re: Low hanging fruit?

/ "Innovimax SARL" <innovimax@gmail.com> was heard to say:
|> No, it'll be (p:inline|p:document|p:pipe|p:empty)*
|
| hum...
|>
|> If you don't provide any binding at all, you get a binding to the
|> default readable port.
|
| Ok fair enough
|
| But the model as explained is troublesome (some would end up trying to
| understand, p:empty as "empty document" which has no meaning)
| so I guess
| (p:empty|(p:inline|p:document|p:pipe)+)?

Not quite, I think it's:

  (p:empty? | (p:inline|p:document|p:pipe)*)

Consider:

<p:count/>

This counts the number of documents that appear on the default input
port.

I think this:

<p:count>
  <p:input port="source"/>
</p:count>

should also count the number of documents that appear on the default
input port.

In atomic steps, I can just leave out the p:input element, but for
compound steps I can't, so it would be inconvenient if

  <p:input port="source"/>

wasn't a request for the default binding.

I think this:

<p:count>
  <p:input port="source">
    <p:empty/>
  </p:input>
</p:count>

counts the number of documents in the empty sequence, so it best
return zero.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | To what excesses will men not go for
http://nwalsh.com/            | the sake of a religion in which they
                              | believe so little and which they
                              | practice so imperfectly!--La Bruyère

Received on Wednesday, 30 May 2007 19:12:05 UTC