RE: XForms processor

There are quite a few differences between the rather old W3Schools example
and the last public version of the specification.

Here is a version compliant with the latest published version of the XForms
specification.

You could use CSS to style the form controls, or additional bindings
or an XML Schema to better describe the data, or even remove the
<instance>...</instance> entirely and let
the "lazy author" feature of spec-compliant XForms processors create one for
you.

Leigh.

<?xml version="1.0" ?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <head>
    <title>Example</title>
    <model xmlns="http://www.w3.org/2002/xforms/cr">
      <submission id="pay" action="http://www.example.com/cgi-bin/echo.sh"
method="post"/>
      <instance>
	  <pay xmlns="">
	    <as>credit</as>
	    <cc />
	    <exp>2003-11</exp>
	  </pay>
      </instance>

      <!-- These next few "bind" lines are optional but improve validation
and appearance -->
      <!-- See http://www.w3schools.com/schema/schema_dtypes_date.asp -->
      <bind nodeset="exp" type="xsd:gYearMonth" />
      <bind nodeset="cc" relevant="/pay/as = 'credit'" />
      <bind nodeset="exp" relevant="/pay/as = 'credit'" />
    </model>
  </head>
  <body>
    <group class="box" xmlns="http://www.w3.org/2002/xforms/cr">
      <select1 class="mine" ref="as">
	  <label>Select Payment Method</label>
	  <choices>
	    <item>
	      <label>Cash</label>
	      <value>cash</value>
	    </item>
	    <item>
	      <label>Credit</label>
	      <value>credit</value>
	    </item>
	  </choices>
      </select1>
      <input class="mine cc" ref="cc">
	  <label>Credit Card Number</label>
      </input>
      <input class="mine" ref="exp">
	  <label>Expiration Date</label>
      </input>
      <submit submission="pay">
	  <label>Submit</label>
      </submit>
    </group>
  </body>
</html>

-----Original Message-----
From: AndrewWatt2001@aol.com [mailto:AndrewWatt2001@aol.com] 
Sent: Friday, May 16, 2003 12:02 PM
To: jemaxson@fedex.com
Cc: www-forms@w3.org
Subject: Re: XForms processor


In a message dated 16/05/2003 19:42:21 GMT Daylight Time, jemaxson@fedex.com
writes:


Is there an XForms processor that will display the following example in IE 6
SP1?  FormsPlayer did not work.  Their example uses <xform:Select1> and the
example from the link below uses <xform:SelectOne>!  Yikes!
  
Example:
http://www.w3schools.com/xforms/xforms_xhtml.asp
  
Thanks for your help.



Hi,

The select1 element is in the Candidate Recommendation. <selectOne>, for
better or worse, was dropped.

So the w3schools.com example is now out of date.

I hope that helps.

Andrew Watt 

Received on Tuesday, 20 May 2003 20:28:36 UTC