Re: The default readable port in a for-each?

Well

I would say it is covered by

2.5 Environnement

[[

   -

   If there is a preceding sibling step element:
    -

      If that preceding sibling has a *primary output
port<http://www.w3.org/XML/XProc/docs/langspec.html#dt-primary-output-port>
      *, then that output port becomes the *default readable
port<http://www.w3.org/XML/XProc/docs/langspec.html#dt-default-readable-port>
      *.
      -

      Otherwise, the *default readable
port<http://www.w3.org/XML/XProc/docs/langspec.html#dt-default-readable-port>
      * is undefined.

]]

That means that the input of "second" is the output of "first"

Mohamed

On Tue, Oct 28, 2008 at 12:08 PM, Norman Walsh <ndw@nwalsh.com> wrote:

> Consider:
>
>  <p:for-each>
>    <p:identity name="first"/>
>    <p:identity name="second"/>
>  </p:for-each>
>
> The description of p:for-each says:
>
>  The environment inherited by the contained steps of a p:for-each is
>  the inherited environment with these modifications:
>    * The port named "current" on the p:for-each is added to the
>      readable ports.
>    * The port named "current" on the p:for-each is made the default
>      readable port.
>
> In the case of the identity step named "first", this clearly has the
> desired consequence: first reads the current port of the loop.
>
> In the case of the identity step named "second", to what is the
> "source" port bound?
>
> I think our spec currently says that it's bound to the current port of
> the loop, but I'm not sure that's what we want.
>
>                                        Be seeing you,
>                                          norm
>
> --
> Norman Walsh <ndw@nwalsh.com> | Language is by its very nature a
> http://nwalsh.com/            | communal thing; that is, it expresses
>                              | never the exact thing but a
>                              | compromise--that which is common to
>                              | you, me, and everybody.--T. E. Hulme
>



-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Tuesday, 28 October 2008 11:35:43 UTC