W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2008

Re: possible bug in p:iteration select

From: Norman Walsh <ndw@nwalsh.com>
Date: Wed, 01 Oct 2008 09:25:30 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m23ajgmoqd.fsf@nwalsh.com>
"Josh Matthews" <joshmatthews@gmail.com> writes:

> On Wed, Oct 1, 2008 at 7:30 AM, Norman Walsh <ndw@nwalsh.com> wrote:
>
>>
>> But it would lead to very messy edge cases. What does this mean:
>>
>> <p:with-option name="something">
>>  Now this is a
>>  <p:pipe step="main" port="source"/>
>>  test.
>> </p:with-option>
>>
>> How is that different from this:
>>
>> <p:with-option name="something">
>>  Now this is a
>>  <h:div>Some randome content</h:div>
>>  test.
>> </p:with-option>
>
> It isn't different - the XML coming in over the source port gets inserted at
> that position in the option content. Imagine the result of the pipe is
> always "<h:div>Some randome content</h:div>", then the two constructs are
> identical. Maybe I'm missing something fundamental - why is that messy?

Well, a couple of things.

1. We don't interpolate contents anywhere else. Put a p:pipe inside a
p:inline and it's just a p:inline element, it doesn't *do* anything.

2. In XProc V1, the values of options, variables, and parameters can
only be strings. So you'd have to interpolate, take the resulting
document, get it's string value, concatenate it with the rest...

> Totally agree - but my point is to extend those semantics to (most, if not
> all) XSLT constructs. To use the example above, this is totally fine in
> XSLT:
>
> <xsl:call-template name="sometemplate">
>     <xsl:with-param name="someparam">
>           This is some content for the param, with the result of:
>           <xsl:call-template name="someothertemplate" />
>           inserted in it!
>    </xsl:with-param>
> </xsl:call-template>
>
> The nested <xsl:call-template> is analogous to the nested <p:pipe>.

I guess we could have gone that way, but we didn't. Maybe in V.next.
Whatever V.next allows structured variables, options, and parameters!

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | A toy car is a projection of a real
http://nwalsh.com/            | car, made small enough for a child's
                              | hand and imagination to grasp. A real
                              | car is a projection of a toy car, made
                              | large enough for an adult's hand and
                              | imagination to grasp.--Michael Frayn

Received on Wednesday, 1 October 2008 13:26:14 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 1 October 2008 13:26:14 GMT