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

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

From: <vojtech.toman@emc.com>
Date: Thu, 10 Mar 2011 04:30:26 -0500
To: <xproc-dev@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE334C19B892@MX20A.corp.emc.com>
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

--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech

From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] 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:inline-template>
   <p:with-param name="..." select="..."/>
   <p:inline>
      <foo>{$bar}</foo>
   </p:inline>
</p:inline-template>

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">
        <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 09:37:05 GMT

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