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

Re: Context for p:option

From: Jeni Tennison <jeni@jenitennison.com>
Date: Wed, 06 Jun 2007 14:49:24 +0100
Message-ID: <4666BB64.9070902@jenitennison.com>
To: public-xml-processing-model-wg@w3.org

Norman Walsh wrote:
> / ht@inf.ed.ac.uk (Henry S. Thompson) was heard to say:
> | Norman Walsh writes:
> |
> |> For p:input (and its friends: p:iteration-source, etc.) if there's
> |> no explicit binding, the binding is made to the default readable port.
> |> Jeni pointed out, I think correctly, that users will expect a select
> |> expression on p:option to also be bound to the default readable port
> |> by default.
> |>
> |> Anyone disagree?
> |
> | Not strongly, but I think what people will _really_ expect is that it
> | will be bound to the primary input of the step by default.  As long as
> | that input defaults, this makes no difference, but I think users will
> | be surprised if they write
> |
> |  <p:pipeline name="top">
> |   <p:input port="stylesheet"/>
> |   . . .
> |   <p:customize>
> |    <p:input port="primary">
> |     <p:pipe step="top" port="stylesheet"/>
> |    </p:input>
> |    <p:option name="version" select="/xsl:stylesheet/@version"/>
> |    . . .
> |
> | and it doesn't work.
> 
> Indeed.

Really? I don't expect it to work like Henry does at all. The analogous 
situation in XSLT is:

   <xsl:apply-templates select="some/element">
     <xsl:with-param name="strId" select="@id" />
   </xsl:apply-templates>

Do you expect $strId to be set based on the id attribute of the 
element(s) that you apply templates to (some/element), or based on the 
node that you're on when you do the apply templates?

Jeni
Received on Wednesday, 6 June 2007 13:49:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:52 GMT