]> code.delx.au - gnu-emacs-elpa/blob - packages/html5-schema/data.rnc
Merge commit '0cda39255827f283e7578cd469ae42daad9556a2' from js2-mode
[gnu-emacs-elpa] / packages / html5-schema / data.rnc
1 datatypes w = "http://whattf.org/datatype-draft"
2
3 # #####################################################################
4 ## RELAX NG Schema for HTML 5: Static Data Markup #
5 # #####################################################################
6
7 ## Time: <time>
8
9 time.elem =
10 element time { time.inner & time.attrs }
11 time.attrs =
12 ( common.attrs
13 & time.attrs.datetime?
14 & common.attrs.aria?
15 )
16 time.attrs.datetime =
17 attribute datetime {
18 common.data.time-datetime
19 }
20 time.attrs.datetime.dateonly =
21 attribute datetime {
22 common.data.date
23 }
24 time.attrs.datetime.tz =
25 attribute datetime {
26 common.data.datetime
27 }
28 time.inner =
29 ( common.inner.phrasing ) #Cannot enforce textContent format here
30
31 common.elem.phrasing |= time.elem
32
33 ## Data: <data>
34
35 data.elem =
36 element data { data.inner & data.attrs }
37 data.attrs =
38 ( common.attrs
39 & data.attrs.value
40 & common.attrs.aria?
41 )
42 data.attrs.value =
43 attribute value {
44 string
45 }
46 data.inner =
47 ( common.inner.phrasing )
48
49 common.elem.phrasing |= data.elem
50
51 ## Scalar Gauge: <meter>
52
53 meter.elem =
54 element meter { meter.inner & meter.attrs }
55 meter.attrs =
56 ( common.attrs
57 & meter.attrs.value
58 & meter.attrs.min?
59 & meter.attrs.low?
60 & meter.attrs.high?
61 & meter.attrs.max?
62 & meter.attrs.optimum?
63 & ( common.attrs.aria.implicit.progressbar
64 | common.attrs.aria.role.progressbar
65 )?
66 )
67 meter.attrs.value =
68 attribute value {
69 common.data.float
70 }
71 meter.attrs.min =
72 attribute min {
73 common.data.float
74 }
75 meter.attrs.low =
76 attribute low {
77 common.data.float
78 }
79 meter.attrs.high =
80 attribute high {
81 common.data.float
82 }
83 meter.attrs.max =
84 attribute max {
85 common.data.float
86 }
87 meter.attrs.optimum =
88 attribute optimum {
89 common.data.float
90 }
91 meter.inner =
92 ( common.inner.phrasing ) #Cannot enforce textContent format here
93
94 common.elem.phrasing |= meter.elem