W3C home > Mailing lists > Public > public-forms@w3.org > March 2008

Simplified and Canonical Form of XForms PO example

From: John Boyer <boyerj@ca.ibm.com>
Date: Wed, 12 Mar 2008 08:43:09 -0700
To: Forms WG (new) <public-forms@w3.org>
Message-ID: <OFD4B7890E.0BA1A6A1-ON8825740A.00562D97-8825740A.00565AD1@ca.ibm.com>

<repeat name="row">
    <select1 name="Product"> ...
    <input name="Quantity"> ...
    <input name="Price"> ...
    <output name="LineTotal" calculate="$Price * $Quantity"/>
<output name="Subtotal" calculate="sum($LineTotal)"/>
<output name="Tax" calculate="$Subtotal * 0.07"/>
<output name="Total" calculate="$Subtotal + $Tax"/>


  <bind id="row" nodeset="row">
    <bind id="Product" nodeset="Product"/>
    <bind id="Price" nodeset="Price"/>
    <bind id="Quantity" nodeset="Quantity"/>
    <bind id="LineTotal" nodeset="LineTotal" calculate="$Price * 
  <bind id="Subtotal" nodeset="Subtotal" calculate="sum($LineTotal)"/>
  <bind id="Tax" nodeset="Tax" calculate="$Subtotal * 0.07"/> 
  <bind id="Total" nodeset="Total" calculate="$Subtotal + $Tax"/>

<repeat bind="row">
    <select1 bind="Product"> ...
    <input bind="Quantity"> ...
    <input bind="Price"> ...
    <output bind="LineTotal" calculate="$Price * $Quantity"/>
<output bind="Subtotal"/>
<output bind="Tax"/>
<output bind="Total"/>

John M. Boyer, Ph.D.
Senior Technical Staff Member
Lotus Forms Architect and Researcher
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 
Received on Wednesday, 12 March 2008 15:43:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:56 UTC