summaryrefslogtreecommitdiff
path: root/etc/schema/xhtml-bform.rnc
blob: c0a78a1d72e6a69630e797a59d653ff58647b884 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Simplified Forms Module

form =
  element form {
    form.attlist,
    # Don't use Block.model, because this gets redefined by the
    # legacy module.
    Block.class+
  }
form.attlist =
  Common.attrib,
  attribute action { URI.datatype },
  attribute method { "get" | "post" }?,
  attribute enctype { ContentType.datatype }?
label = element label { label.attlist, Inline.model }
label.attlist =
  Common.attrib,
  attribute for { IDREF.datatype }?,
  attribute accesskey { Character.datatype }?
input = element input { input.attlist }
input.attlist =
  Common.attrib,
  attribute type { InputType.class }?,
  attribute name { text }?,
  attribute value { text }?,
  attribute checked { "checked" }?,
  attribute size { text }?,
  attribute maxlength { Number.datatype }?,
  attribute src { URI.datatype }?,
  attribute accesskey { Character.datatype }?
InputType.class =
  "text"
  | "password"
  | "checkbox"
  | "radio"
  | "submit"
  | "reset"
  | "hidden"
select = element select { select.attlist, option+ }
select.attlist =
  Common.attrib,
  attribute name { text }?,
  attribute size { Number.datatype }?,
  attribute multiple { "multiple" }?
option =
  element option {
    Common.attrib,
    attribute selected { "selected" }?,
    attribute value { text }?,
    text
  }
textarea = element textarea { textarea.attlist }
textarea.attlist =
  Common.attrib,
  attribute name { text }?,
  attribute rows { Number.datatype },
  attribute cols { Number.datatype },
  attribute accesskey { Character.datatype }?,
  text
Form.class = form
Formctrl.class = input | label | select | textarea
Block.class |= Form.class
Inline.class |= Formctrl.class