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

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

From: Romain Deltour <rdeltour@gmail.com>
Date: Thu, 10 Mar 2011 09:09:04 +0100
Cc: XProc Dev <xproc-dev@w3.org>
Message-Id: <28A4A204-1819-42AC-B389-FA947F3114E1@gmail.com>
To: Christopher.R.Ball <christopher.r.ball@gmail.com>
You should be able to use p:string-replace:

<p:string-replace match="myElem/text()" replace="'some text'"/>

see: http://www.w3.org/TR/xproc/#c.string-replace

BR,
Romain.

Le 10 mars 11 à 04:04, Christopher.R.Ball a écrit :

>
> Am I missing something . . . or is it not possible to dynamically  
> set the text() of an element in a pipeline (in xproc without having  
> to jump out to P:XSTL or P:XQUERY)?
>
> Something to the effect of:
>
> <p:for-each name="UploadInGroups">
>     <p:insert position="last-child" match="/add/doc"  
> name="insertCounter">
>       <p:input port="insertion">
>         <p:inline>
>           <field name="iterationCount">p:iteration-position()</field>
>         </p:inline>
>       </p:input>
>     </p:insert>
>
>     . . .
>
> </p:for-each>
>
> Most grateful,
>
> Christopher
Received on Thursday, 10 March 2011 08:09:41 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 10 March 2011 08:09:41 GMT