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

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

From: Alex Muir <alex.g.muir@gmail.com>
Date: Thu, 10 Mar 2011 10:31:25 +0000
Message-ID: <AANLkTikXOA2r99a=QDxsX1C2hguViBq1cAwmnxmPT5SD@mail.gmail.com>
To: vojtech.toman@emc.com
Cc: xproc-dev@w3.org
Okay i understand now. Thanks very much.

I wonder if it can or cannot be written as follows?

<p:for-each name="UploadInGroups">

  <p:insert position="last-child" match="/add/doc">

       <p:template>

          <p:inline>

          <field name="iterationCount">$pos</field>

          </p:inline>

         <p:with-param name=”pos” select=”p:iteration-position()”/>

     </p:template>

  </p:insert>

    . . .

</p:for-each>

Regards
Alex
On Thu, Mar 10, 2011 at 9:54 AM, <vojtech.toman@emc.com> wrote:

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



-- 
Alex
-----
Currently:
Freelance Software Engineer 6+ yrs exp
<http://www.facebook.com/pages/Bafila/125611807494851>
Previously:
https://sites.google.com/a/utg.edu.gm/alex/


A Bafila, is two rivers flowing together as one:
http://www.facebook.com/pages/Bafila/125611807494851
Received on Thursday, 10 March 2011 10:31:59 GMT

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