Advertisement
Guest User

Untitled

a guest
Jan 26th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. <!--$Id: sliceE.html,v 1.1 2002/01/17 00:08:14 tvraman Exp $-->
  2. <html xmlns="http://www.w3.org/1999/xhtml"
  3. xmlns:xforms="http://www.w3.org/2002/01/xforms"
  4. xmlns:xlink="http://www.w3.org/1999/xlink"
  5. xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  6. xmlns:my="http://commerce.example.com/payment"
  7. xml:lang="en">
  8. <head>
  9. <title>XForms in XHTML</title>
  10.  
  11. <xforms:model>
  12. <xforms:instance>
  13. <payment as="credit" xmlns="http://commerce.example.com/payment">
  14. <cc/>
  15. <exp/>
  16. </payment>
  17. </xforms:instance>
  18. <xforms:schema xlink:href="payschema.xsd"/>
  19. <xforms:submitInfo action="http://example.com/submit" method="post" id="s00"/>
  20. <xforms:bind ref="my:payment/my:cc"
  21. relevant="../my:payment/@as = 'credit'"
  22. required="true" type="my:cc"/>
  23. <xforms:bind ref="my:payment/my:exp"
  24. relevant="../my:payment/@as = 'credit'"
  25. required="true" type="xsd:gYearMonth"/>
  26. </xforms:model>
  27. </head>
  28. <body>
  29. <group xmlns="http://www.w3.org/2002/01/xforms" ref="my:payment">
  30. <selectOne ref="@as">
  31. <caption>Select Payment Method</caption>
  32. <choices>
  33. <item>
  34. <caption>Cash</caption>
  35. <value>cash</value>
  36. </item>
  37. <item>
  38. <caption>Credit</caption>
  39. <value>credit</value>
  40. </item>
  41. </choices>
  42. </selectOne>
  43.  
  44. <input ref="my:cc">
  45. <caption>Credit Card Number</caption>
  46. </input>
  47.  
  48. <input ref="my:exp">
  49. <caption>Expiration Date</caption>
  50. </input>
  51.  
  52. <submit submitInfo="s00">
  53. <caption>Submit Form</caption>
  54. </submit>
  55. </group>
  56.  
  57. </body>
  58. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement