blob: 477f66b5d0855a2b85ed0c2ed017c1a0db9ffcf1 (
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
64
65
66
67
68
69
|
datatypes w = "http://whattf.org/datatype-draft"
# #####################################################################
## RELAX NG Schema for HTML 5: Static Data Markup #
# #####################################################################
## Time: <time>
time.elem =
element time { time.inner & time.attrs }
time.attrs =
( common.attrs
& time.attrs.datetime?
& time.attrs.pubdate?
)
time.attrs.datetime =
attribute datetime {
common.data.date-or-time #REVISIT check format
}
time.attrs.pubdate =
attribute pubdate {
w:string "pubdate" | w:string ""
}
time.inner =
( common.inner.phrasing ) #Cannot enforce textContent format here
common.elem.phrasing |= time.elem
## Scalar Gauge: <meter>
meter.elem =
element meter { meter.inner & meter.attrs }
meter.attrs =
( common.attrs
& meter.attrs.value
& meter.attrs.min?
& meter.attrs.low?
& meter.attrs.high?
& meter.attrs.max?
& meter.attrs.optimum?
)
meter.attrs.value =
attribute value {
common.data.float
}
meter.attrs.min =
attribute min {
common.data.float
}
meter.attrs.low =
attribute low {
common.data.float
}
meter.attrs.high =
attribute high {
common.data.float
}
meter.attrs.max =
attribute max {
common.data.float
}
meter.attrs.optimum =
attribute optimum {
common.data.float
}
meter.inner =
( common.inner.phrasing ) #Cannot enforce textContent format here
common.elem.phrasing |= meter.elem
|