- From: <vojtech.toman@emc.com>
- Date: Thu, 10 Mar 2011 04:54:42 -0500
- To: <xproc-dev@w3.org>
- Message-ID: <3799D0FD120AD940B731A37E36DAF3FE334C19B8A3@MX20A.corp.emc.com>
If I understood your example correctly, you want to iterate to iterate over a sequence of documents, and insert the "field" element in each of them. In your original source, the "source" primary input port if p:identity was automatically bound to the "current" port of p:for-each, because p:insert was the first step of the sub-pipeline. However, with the addition of p:string-replace/p:template, p:identity needs to use an explicit binding to the "current" port of p:for-each otherwise it would use the result of the p:string-replace/p:template as the source.
Vojtech
--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech
From: Alex Muir [mailto:alex.g.muir@gmail.com]
Sent: Thursday, March 10, 2011 10:48 AM
To: Toman, Vojtech
Cc: xproc-dev@w3.org
Subject: Re: Dynamically setting the text of an added element in a pipeline . . ?
Hi,
Just a general question. When UploadInGroups, the name of the for-loop is the source pipe for the p:insert within the for-loop what is this doing?
<p:input port="source">
<p:pipe step=" UploadInGroups" port="current"/>
</p:input>
-----------
<p:for-each name="UploadInGroups">
<p:template name="create-field">
<p:input port="template">
<p:inline>
<field name="iterationCount">$pos</field>
</p:inline>
</p:input>
<p:with-param name="pos" select="p:iteration-position()"/>
</p:template>
<p:insert position="last-child" match="/add/doc" name="insertCounter">
<p:input port="source">
<p:pipe step=" UploadInGroups" port="current"/>
</p:input>
<p:input port="insertion">
<p:pipe step="create-field" port="result"/>
</p:input>
</p:insert>
. . .
</p:for-each>
Regards
Alex
Received on Thursday, 10 March 2011 09:56:18 UTC