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

Re: possible bug in p:iteration select

From: Josh Matthews <joshmatthews@gmail.com>
Date: Wed, 1 Oct 2008 09:15:10 -0400
Message-ID: <ffee23380810010615s247476e7yb749748991fe9a8b@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: "XProc Dev" <xproc-dev@w3.org>
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?

Hmm... I suppose if the pipe yields a document (do pipe always yield
documents? Can they return just elements?), then it is messy. But only as a
result of the already messy (IMHO) document/data duality in XML! :-( But hmm
again - wouldn't the semantics for document inclusion be the same as for
<xsl:include>?

Second, our semantics for select are exactly the same as the XSLT
> semantics. I'm sort of expecting most of our users will have some XSLT
> experience.


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>.

Cheers,
Josh Matthews
Received on Wednesday, 1 October 2008 13:15:48 GMT

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