]> code.delx.au - gnu-emacs-elpa/blobdiff - packages/html5-schema/data.rnc
Add 'packages/html5-schema/' from commit '6e7c7c331e7f6692be6c7d39fb9485792f0d3513'
[gnu-emacs-elpa] / packages / html5-schema / data.rnc
diff --git a/packages/html5-schema/data.rnc b/packages/html5-schema/data.rnc
new file mode 100644 (file)
index 0000000..991f698
--- /dev/null
@@ -0,0 +1,94 @@
+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?
+               &       common.attrs.aria?
+               )
+               time.attrs.datetime =
+                       attribute datetime {
+                               common.data.time-datetime
+                       }
+               time.attrs.datetime.dateonly =
+                       attribute datetime {
+                               common.data.date
+                       }
+               time.attrs.datetime.tz =
+                       attribute datetime {
+                               common.data.datetime
+                       }
+       time.inner =
+               ( common.inner.phrasing ) #Cannot enforce textContent format here
+
+       common.elem.phrasing |= time.elem
+
+## Data: <data>
+
+       data.elem =
+               element data { data.inner & data.attrs }
+       data.attrs =
+               (       common.attrs
+               &       data.attrs.value
+               &       common.attrs.aria?
+               )
+               data.attrs.value =
+                       attribute value {
+                               string
+                       }
+       data.inner =
+               ( common.inner.phrasing )
+
+       common.elem.phrasing |= data.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?
+               &       (       common.attrs.aria.implicit.progressbar
+                       |       common.attrs.aria.role.progressbar
+                       )?
+               )
+               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