- From: <Toman_Vojtech@emc.com>
- Date: Thu, 12 Aug 2010 12:33:22 -0400
- To: <public-xml-processing-model-wg@w3.org>
> <p:template match="...">
> [XML goes here, with {} interpreted in both attr vals and text
content,
> and something like <c:copy select="..."/> recognised]
> </p:template>
>
> This would allow the following simplifications (drawn from real
> examples):
>
> Replace
>
> <p:insert position="first-child">
> <p:input port="insertion">
> <p:inline><Timestamp><here/></Timestamp></p:inline>
> </p:input>
> </p:insert>
>
> <p:string-replace match="mt:Timestamp/mt:here">
> <p:with-option name="replace"
select="concat('"',$stamp,'"')"/>
> </p:string-replace>
>
> with
>
> <p:template match="/top">
> <top>
> <c:copy select="@*"/>
> <Timestamp>{$stamp}</Timestamp>
> <c:copy select="node()"/>
> </top>
> </p:template>
>From the examples above, I don't see if p:template would be a step or a
binding. (I expect it to be a step, but I don't see an input port.)
Personally, I think that making it a step would be more flexible because
you could then, for instance, use other steps to dynamically construct
the "template XML document" and then pass it to p:template.
Vojtech
--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech
Received on Thursday, 12 August 2010 16:34:27 UTC