Re: For-each question

Jeni Tennison wrote:
> 
> My reasons for arguing against declaring all the inputs required by a 
> <p:for-each> (or <p:choose>) are:
> 
> 1. It's unnecessary (implementations can work out what extra inputs are 
> required for themselves)

OK.  And extra outputs?  What happens to those?  Do they go to the bit
bucket or do they produce a collection?

> 
> 2. It's tedious for users

I'm not convinced that it is that onerous.

> 
> 3. It's unlike iteration in other languages (you don't have to define 
> all the variables used within a for loop in, say, Java)

Unlike iteration in other languages, that input must be replayed for
each iteration.

We should probably work through some examples that have multiple inputs
and outputs for steps inside an iteration.

Ignoring the "old" syntax, we have one use case that is somewhat
close for multiple outputs:

    5.6: http://www.w3.org/XML/XProc/docs/use-cases/web/use-case-5-6.xml

It doesn't really exhibit what we want in that it has two outputs from
the XSLT but only one is used by the rest of the pipeline and that is
as the replacement for the matching elements.

So, we probably need better use cases for this.

--Alex Milowski

Received on Monday, 24 July 2006 15:54:05 UTC