W3C home > Mailing lists > Public > www-forms@w3.org > December 2001

Section 2.7 Example Revisions

From: Tomayko, Ryan <Ryan_Tomayko@stercomm.com>
Date: Wed, 12 Dec 2001 10:57:17 -0500
Message-ID: <5FD6397E455FD4118BAE00062938354002C90201@scidubmsg02.isg.stercomm.com>
To: "'www-forms@w3.org'" <www-forms@w3.org>
I'll take a shot at revising the model example in section 2.7.
    <payment as="credit" xmlns="http://commerce.example.com/payment">
  <xforms:schema xlink:href="payschema.xsd"/>
  <xforms:submitInfo action="http://example.com/submit" method="post"/>
  <xforms:bind ref="my:payment/my:cc"
      relevant="../my:payment/@as = 'credit'"
      required="true()" type="my:cc"/>
  <xforms:bind ref="my:payment/my:exp"
      relevant="/my:payment/@as = 'credit'"
      required="true()" type="xsd:gYearMonth"/>

The most important change is the relevant contraint. The XPath expression is
evaluated relative to each node in the node-set selected by the ref
attribute (i.e. context node is ref[n]). So, backing up to the ancestor in
bind 1 or providing a absolute path is necessary. 
Hope this helps,
- Ryan

Ryan Tomayko < rtomayko@stercomm.com <mailto:rtomayko@stercomm.com> >
Sterling Commerce


Received on Wednesday, 12 December 2001 10:59:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:05 UTC