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

Yes, the current state is far from optimal. The p:template step has been introduced to make life a little easier in this regard, but it is clearly only a partial substitute for value templates known from, for example, XSLT.
Value templates are definitely on the top of the list of the most wanted XProc.vnext features, and the WG is well aware of this.


Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group

From: [] On Behalf Of Hans-Juergen Rennau
Sent: Thursday, March 10, 2011 10:17 AM
To: Christopher.R.Ball
Cc: XProc Dev
Subject: Re: Dynamically setting the text of an added element in a pipeline . . ?

Hi Christopher and Vojtech,

a remark concerning the template approach Vojtech mentioned.  (Note: in Calabash the template step is still called p:document-template.)

In Christopher's case, the template-based solution is far from elegant, isn't it? 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:with-param name="..." select="..."/>

Has the working group considered that?

Kind regards,
-- Hans-Juergen

Am 10.03.2011 04:04, schrieb Christopher.R.Ball:

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">
          <field name="iterationCount"> p:iteration-position() </field>

    . . .

Most grateful,


Received on Thursday, 10 March 2011 09:37:05 UTC