W3C home > Mailing lists > Public > www-forms@w3.org > January 2002

RE: Section 2.7 Example Revisions

From: Micah Dubinko <MDubinko@cardiff.com>
Date: Wed, 9 Jan 2002 17:05:53 -0800
Message-ID: <E840F0B7E6189547BDB91DA8BF2228AB28C100@csmail.cardiff.com>
To: "'Tomayko, Ryan'" <Ryan_Tomayko@stercomm.com>, "'www-forms@w3.org'" <www-forms@w3.org>
Give the man a cigar! :-)

I hadn't noticed that before. Fixed.

.micah


-----Original Message-----
From: Tomayko, Ryan [mailto:Ryan_Tomayko@stercomm.com]
Sent: Wednesday, December 12, 2001 7:57 AM
To: 'www-forms@w3.org'
Subject: Section 2.7 Example Revisions


I'll take a shot at revising the model example in section 2.7.

<xforms:model>
  <xforms:instance>
    <payment as="credit" xmlns="http://commerce.example.com/payment">
      <cc/>
      <exp/>
    </payment>
  </xforms:instance>
  <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"/>
</xforms:model>

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>
Sterling Commerce
x5183
Received on Wednesday, 9 January 2002 20:08:03 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:50 GMT