xhtml-form.rnc 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Forms Module
  2. # Unlike the DTD implementation, this builds on the basic-form module
  3. include "xhtml-bform.rnc" {
  4. select = element select { select.attlist, (option | optgroup)+ }
  5. }
  6. form.attlist &=
  7. attribute accept-charset { Charsets.datatype }?,
  8. attribute accept { ContentTypes.datatype }?
  9. input.attlist &=
  10. attribute disabled { "disabled" }?,
  11. attribute readonly { "readonly" }?,
  12. attribute alt { text }?,
  13. attribute tabindex { Number.datatype }?,
  14. attribute accept { ContentTypes.datatype }?
  15. InputType.class |= "image" | "button"
  16. select.attlist &=
  17. attribute disabled { "disabled" }?,
  18. attribute tabindex { Number.datatype }?
  19. option.attlist &=
  20. attribute disabled { "disabled" }?,
  21. attribute label { Text.datatype }?
  22. optgroup = element optgroup { optgroup.attlist, option+ }
  23. optgroup.attlist =
  24. Common.attrib,
  25. attribute disabled { "disabled" }?,
  26. attribute label { Text.datatype }
  27. textarea.attlist &=
  28. attribute disabled { "disabled" }?,
  29. attribute readonly { "readonly" }?,
  30. attribute tabindex { Number.datatype }?
  31. fieldset = element fieldset { fieldset.attlist, legend, Flow.model }
  32. fieldset.attlist = Common.attrib
  33. button = element button { button.attlist, Flow.model }
  34. button.attlist =
  35. Common.attrib,
  36. attribute name { text }?,
  37. attribute value { text }?,
  38. attribute type { "button" | "submit" | "reset" }?,
  39. attribute disabled { "disabled" }?,
  40. attribute tabindex { Number.datatype }?,
  41. attribute accesskey { Character.datatype }?
  42. legend = element legend { legend.attlist, Inline.model }
  43. legend.attlist =
  44. Common.attrib,
  45. attribute accesskey { Character.datatype }?
  46. Form.class |= fieldset
  47. Formctrl.class |= button