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

Re: Variables/Parameters and Scoping

From: Alessandro Vernet <avernet@orbeon.com>
Date: Thu, 18 May 2006 18:08:47 -0700
Message-ID: <4828ceec0605181808l5a390255m633c06d408388c00@mail.gmail.com>
To: public-xml-processing-model-wg <public-xml-processing-model-wg@w3.org>

On 5/18/06, Alex Milowski <alex@milowski.org> wrote:
> <p:let default="input-1">
>     <!-- binds the 'x' parameter for the contained steps -->
>     <p:parameter name="x" value="blue"/>
>     <!-- selects from the default input and binds it to 'y' -->
>     <p:parameter name="y" select="/doc/title"/>


Does this mean that if you want 'x' to be based on 'input-1' and 'y'
on 'input-2' then you need to nested <p:let>? As in:

    <p:let default="input-1">
        <p:param name="x" value="expression on input-1"/>
        <p:let default="input-2">
            <p:param name="y" value="expression on input-2"/>
                <p:with-parm name="a" select="$x"/>
                <p:with-parm name="b" select="$y"/>

What about just having:

    <p:with-parm name="a"
            select="expression on input-1" labelref="input-1"/>
    <p:with-parm name="b"
            select="expression on input-2" labelref="input-2"/>

This would not allow an expression that uses *both* input-1 and
input-2, hence the proposal of introducing a function instead of the
'labelref' attribute (similar to the instance() function introduced by

        <p:with-parm name="a" select="expression using
            label('input-1') and label('input-2')"/>

Blog (XML, Web apps, Open Source):
Received on Friday, 19 May 2006 01:08:52 UTC

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