W3C home > Mailing lists > Public > xproc-dev@w3.org > March 2011

RE: Dynamically setting the text of an added element in a pipeline . . ?

From: <vojtech.toman@emc.com>
Date: Thu, 10 Mar 2011 05:34:20 -0500
To: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE334C19B8C2@MX20A.corp.emc.com>
> > The template mechanism is fine, but it is a pity that it is
> > only available as a step, not *directly* applicable to
> > p:inline.  Hence the extra step, bad readability and verbosity.
> > What I would wish for were a template variant of p:inline,
> > something like:
> 
> > <p:inline-template>
> >    <p:with-param name="..." select="..."/>
> >    <p:inline>
> >       <foo>{$bar}</foo>
> >    </p:inline>
> > </p:inline-template>
> 
>   I don't quite understand.  What's the difference with the
> following? :
> 
>     <p:template>
>        <p:input port="template">
>           <p:inline>
>              <foo>{ $bar }</foo>
>           </p:inline>
>        </p:input>
>        <p:with-param name="bar" select="..."/>
>     </p:template>

That p:template is a step, whereas p:inline-template is, I think, meant to be a new type of a binding, like a more dynamic p:inline.
The WG actually considered this approach, as well as some others (one of the proposals was to include a @dynamic="true|false" attribute to the currently available bindings - p:inline, p:document, p:pipe etc.). But in the end, it was decided to go with a new optional p:template step. The problem with other approaches was that they would result in quite a dramatic change to the core language, and at that time it was simply too late for this.

Vojtech


--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech
Received on Thursday, 10 March 2011 10:37:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 10 March 2011 10:37:32 GMT