W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2009

Compute attribute value with set-attribute

From: Florent Georges <fgeorges@fgeorges.org>
Date: Mon, 6 Apr 2009 23:12:30 +0200
Message-ID: <ebaca5bf0904061412u745b9ba5s317ea5eb73624e6e@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>

  I want to set an attribute on an element using an XPath
expression.  So I use the step p:add-attribute, with a
p:with-option for the attribute-value option:

    <p:declare-step xmlns:p="http://www.w3.org/ns/xproc">

       <p:output port="result"/>

       <p:add-attribute match="elem" attribute-name="a">
          <p:input port="source">
          <p:with-option name="attribute-value" select="'value'"/>


but I get an error running this pipeline:

    Error : .../bug-calabash.xproc:15: option attribute-value
    unbound on p:add-attribute step named #ANON.86 and no default
    readable port.

  If I set the option through the attribute:

    <p:add-attribute match="elem" attribute-name="a" attribute-value="value">
       <p:input port="source">

everything runs fine and I get the expected result:

    <elem a="value"/>

  I use Calabash 0.9.7.  Did I miss something obvious with the
step p:set-attribute or with options?


Florent Georges
Received on Monday, 6 April 2009 21:13:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:04 UTC