nora_mark 0.2beta3 → 0.2beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile +2 -0
- data/README.md +17 -12
- data/example/nora-simple.css +52 -0
- data/example/noramark-reference-ja.nora +246 -0
- data/example/noramark-reference-ja_00001.xhtml +187 -0
- data/lib/nora_mark/html/{abstract_item_writer.rb → abstract_node_writer.rb} +3 -3
- data/lib/nora_mark/html/context.rb +3 -21
- data/lib/nora_mark/html/frontmatter_writer.rb +33 -0
- data/lib/nora_mark/html/generator.rb +122 -100
- data/lib/nora_mark/html/pages.rb +3 -9
- data/lib/nora_mark/html/paragraph_writer.rb +27 -23
- data/lib/nora_mark/html/tag_writer.rb +33 -34
- data/lib/nora_mark/html/writer_selector.rb +3 -3
- data/lib/nora_mark/node.rb +31 -0
- data/lib/nora_mark/parser.kpeg +133 -79
- data/lib/nora_mark/parser.kpeg.rb +1822 -1526
- data/lib/nora_mark/parser.rb +4 -23
- data/lib/nora_mark/version.rb +1 -1
- data/lib/nora_mark.rb +7 -2
- data/nora_mark.gemspec +1 -0
- data/spec/epub30-schemas/epub-nav-30.nvdl +16 -0
- data/spec/epub30-schemas/epub-nav-30.rnc +10 -0
- data/spec/epub30-schemas/epub-nav-30.sch +72 -0
- data/spec/epub30-schemas/epub-svg-30.nvdl +15 -0
- data/spec/epub30-schemas/epub-svg-30.rnc +15 -0
- data/spec/epub30-schemas/epub-svg-30.sch +10 -0
- data/spec/epub30-schemas/epub-xhtml-30.nvdl +15 -0
- data/spec/epub30-schemas/epub-xhtml-30.rnc +37 -0
- data/spec/epub30-schemas/epub-xhtml-30.sch +377 -0
- data/spec/epub30-schemas/epub30-catalog.xml +335 -0
- data/spec/epub30-schemas/media-overlay-30.nvdl +14 -0
- data/spec/epub30-schemas/media-overlay-30.rnc +46 -0
- data/spec/epub30-schemas/media-overlay-30.sch +9 -0
- data/spec/epub30-schemas/mod/datatypes.rnc +143 -0
- data/spec/epub30-schemas/mod/epub-mathml3-30.rnc +74 -0
- data/spec/epub30-schemas/mod/epub-prefix-attr.rnc +8 -0
- data/spec/epub30-schemas/mod/epub-ssml-attrs.rnc +11 -0
- data/spec/epub30-schemas/mod/epub-svg11-30.rnc +12 -0
- data/spec/epub30-schemas/mod/epub-svg11-re.sch +7 -0
- data/spec/epub30-schemas/mod/epub-switch.rnc +32 -0
- data/spec/epub30-schemas/mod/epub-trigger.rnc +17 -0
- data/spec/epub30-schemas/mod/epub-type-attr.rnc +7 -0
- data/spec/epub30-schemas/mod/epub-xhtml-mathml3-30.rnc +5 -0
- data/spec/epub30-schemas/mod/epub-xhtml-svg11-30.rnc +6 -0
- data/spec/epub30-schemas/mod/html5/LICENSE +23 -0
- data/spec/epub30-schemas/mod/html5/README +21 -0
- data/spec/epub30-schemas/mod/html5/html5-aria-30.rnc +105 -0
- data/spec/epub30-schemas/mod/html5/html5-attrib-30.rnc +44 -0
- data/spec/epub30-schemas/mod/html5/html5-document-30.rnc +44 -0
- data/spec/epub30-schemas/mod/html5/html5-edit-30.rnc +24 -0
- data/spec/epub30-schemas/mod/html5/html5-embed-30.rnc +155 -0
- data/spec/epub30-schemas/mod/html5/html5-forms-30.rnc +431 -0
- data/spec/epub30-schemas/mod/html5/html5-grouping-30.rnc +115 -0
- data/spec/epub30-schemas/mod/html5/html5-interactive-30.rnc +86 -0
- data/spec/epub30-schemas/mod/html5/html5-models-30.rnc +10 -0
- data/spec/epub30-schemas/mod/html5/html5-phrasing-30.rnc +134 -0
- data/spec/epub30-schemas/mod/html5/html5-script-30.rnc +164 -0
- data/spec/epub30-schemas/mod/html5/html5-sections-30.rnc +58 -0
- data/spec/epub30-schemas/mod/html5/html5-style-30.rnc +18 -0
- data/spec/epub30-schemas/mod/id-unique.sch +10 -0
- data/spec/epub30-schemas/mod/mathml/LICENSE +3 -0
- data/spec/epub30-schemas/mod/mathml/mathml3-common.rnc +84 -0
- data/spec/epub30-schemas/mod/mathml/mathml3-content.rnc +373 -0
- data/spec/epub30-schemas/mod/mathml/mathml3-presentation.rnc +536 -0
- data/spec/epub30-schemas/mod/mathml/mathml3-strict-content.rnc +60 -0
- data/spec/epub30-schemas/mod/security/LICENSE +4 -0
- data/spec/epub30-schemas/mod/security/Lenient-Encryption11-ghc.rnc +41 -0
- data/spec/epub30-schemas/mod/security/Lenient-Encryption11.rnc +39 -0
- data/spec/epub30-schemas/mod/security/Lenient-Signature-exclusiveC14N.rnc +25 -0
- data/spec/epub30-schemas/mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc +32 -0
- data/spec/epub30-schemas/mod/security/Lenient-Signature11-properties.rnc +30 -0
- data/spec/epub30-schemas/mod/security/Lenient-Signature11.rnc +28 -0
- data/spec/epub30-schemas/mod/security/Strict-Encryption.rnc +27 -0
- data/spec/epub30-schemas/mod/security/Strict-Signature.rnc +22 -0
- data/spec/epub30-schemas/mod/security/exc-c14n.rnc +39 -0
- data/spec/epub30-schemas/mod/security/security_any.rnc +15 -0
- data/spec/epub30-schemas/mod/security/xenc-allowAnyForeign.rnc +25 -0
- data/spec/epub30-schemas/mod/security/xenc-schema-11.rnc +96 -0
- data/spec/epub30-schemas/mod/security/xenc-schema.rnc +145 -0
- data/spec/epub30-schemas/mod/security/xenc11-allowAnyForeign.rnc +19 -0
- data/spec/epub30-schemas/mod/security/xmldsig-allowAnyForeign.rnc +47 -0
- data/spec/epub30-schemas/mod/security/xmldsig-core-schema.rnc +276 -0
- data/spec/epub30-schemas/mod/security/xmldsig-filter2.rnc +16 -0
- data/spec/epub30-schemas/mod/security/xmldsig-properties-schema.rnc +34 -0
- data/spec/epub30-schemas/mod/security/xmldsig11-allowAnyForeign.rnc +18 -0
- data/spec/epub30-schemas/mod/security/xmldsig11-schema.rnc +133 -0
- data/spec/epub30-schemas/mod/security/xmlsec-ghc-allowAnyForeign.rnc +21 -0
- data/spec/epub30-schemas/mod/security/xmlsec-ghc-schema.rnc +42 -0
- data/spec/epub30-schemas/mod/svg11/LICENSE +1 -0
- data/spec/epub30-schemas/mod/svg11/README.txt +8 -0
- data/spec/epub30-schemas/mod/svg11/svg11-flat.rnc +3999 -0
- data/spec/epub30-schemas/ocf-container-30.rnc +16 -0
- data/spec/epub30-schemas/ocf-encryption-30.rnc +12 -0
- data/spec/epub30-schemas/ocf-signatures-30.rnc +8 -0
- data/spec/epub30-schemas/package-30.nvdl +14 -0
- data/spec/epub30-schemas/package-30.rnc +91 -0
- data/spec/epub30-schemas/package-30.sch +137 -0
- data/spec/jing-20091111/bin/jing.jar +0 -0
- data/spec/nora_mark_spec.rb +229 -68
- data/spec/spec_helper.rb +16 -0
- metadata +179 -6
- data/lib/nora_mark/html/header_writer.rb +0 -35
- data/spec/fixture/test_src_ja.nora +0 -50
@@ -0,0 +1,134 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
html5.flow.class |= html5.phrasing.class | html5.a.flow
|
5
|
+
|
6
|
+
html5.phrasing.class |= datatype.text | html5.a.phrasing | html5.em | html5.strong | html5.small | html5.cite
|
7
|
+
| html5.q | html5.dfn | html5.abbr | html5.time | html5.code | html5.var | html5.samp
|
8
|
+
| html5.kbd | html5.sup | html5.sub | html5.i | html5.b | html5.mark | html5.bdo | html5.bdi | html5.span
|
9
|
+
| html5.br | html5.wbr | html5.s | html5.u | html5.ruby
|
10
|
+
|
11
|
+
html5.phrasing.attrs &= html5.global.attrs
|
12
|
+
|
13
|
+
|
14
|
+
html5.a.flow = element a { html5.a.flow.attlist & html5.a.flow.content }
|
15
|
+
html5.a.flow.attlist &= html5.global.attrs & html5.a.attrs
|
16
|
+
html5.a.flow.content = html5.flow.model
|
17
|
+
html5.a.phrasing = element a { html5.a.phrasing.attlist & html5.a.phrasing.content }
|
18
|
+
html5.a.phrasing.attlist &= html5.phrasing.attrs & html5.a.attrs
|
19
|
+
html5.a.phrasing.content = html5.phrasing.model
|
20
|
+
html5.a.attrs &= ( html5.href.attr & ( html5.hreflang.attr? & html5.target.attr?
|
21
|
+
& html5.rel.attr? & html5.media.attr? & html5.type.mime.attr? ))?
|
22
|
+
|
23
|
+
html5.abbr = element abbr { html5.abbr.attlist & html5.abbr.content }
|
24
|
+
html5.abbr.attlist &= html5.phrasing.attrs
|
25
|
+
html5.abbr.content = html5.phrasing.model
|
26
|
+
|
27
|
+
html5.b = element b { html5.b.attlist & html5.b.content }
|
28
|
+
html5.b.attlist &= html5.phrasing.attrs
|
29
|
+
html5.b.content = html5.phrasing.model
|
30
|
+
|
31
|
+
html5.bdo = element bdo { html5.bdo.attlist & html5.bdo.content }
|
32
|
+
html5.bdo.attlist &= html5.phrasing.attrs
|
33
|
+
html5.bdo.content = html5.phrasing.model
|
34
|
+
|
35
|
+
html5.bdi = element bdi { html5.bdi.attlist & html5.bdi.content }
|
36
|
+
html5.bdi.attlist &= html5.phrasing.attrs
|
37
|
+
html5.bdi.content = html5.phrasing.model
|
38
|
+
|
39
|
+
html5.br = element br { html5.br.attlist }
|
40
|
+
html5.br.attlist &= html5.phrasing.attrs
|
41
|
+
|
42
|
+
html5.cite = element cite { html5.cite.attlist & html5.cite.content }
|
43
|
+
html5.cite.attlist &= html5.phrasing.attrs
|
44
|
+
html5.cite.content = html5.phrasing.model
|
45
|
+
|
46
|
+
html5.code = element code { html5.code.attlist & html5.code.content }
|
47
|
+
html5.code.attlist &= html5.phrasing.attrs
|
48
|
+
html5.code.content = html5.phrasing.model
|
49
|
+
|
50
|
+
html5.dfn = element dfn { html5.dfn.attlist & html5.dfn.content }
|
51
|
+
html5.dfn.attlist &= html5.phrasing.attrs
|
52
|
+
html5.dfn.content = html5.phrasing.model
|
53
|
+
|
54
|
+
html5.em = element em { html5.em.attlist & html5.em.content }
|
55
|
+
html5.em.attlist &= html5.phrasing.attrs
|
56
|
+
html5.em.content = html5.phrasing.model
|
57
|
+
|
58
|
+
html5.i = element i { html5.i.attlist & html5.i.content }
|
59
|
+
html5.i.attlist &= html5.phrasing.attrs
|
60
|
+
html5.i.content = html5.phrasing.model
|
61
|
+
|
62
|
+
html5.kbd = element kbd { html5.kbd.attlist & html5.kbd.content }
|
63
|
+
html5.kbd.attlist &= html5.phrasing.attrs
|
64
|
+
html5.kbd.content = html5.phrasing.model
|
65
|
+
|
66
|
+
html5.mark = element mark { html5.mark.attlist & html5.mark.content }
|
67
|
+
html5.mark.attlist &= html5.phrasing.attrs
|
68
|
+
html5.mark.content = html5.phrasing.model
|
69
|
+
|
70
|
+
html5.strong = element strong { html5.strong.attlist & html5.strong.content }
|
71
|
+
html5.strong.attlist &= html5.phrasing.attrs
|
72
|
+
html5.strong.content = html5.phrasing.model
|
73
|
+
|
74
|
+
html5.small = element small { html5.small.attlist & html5.small.content }
|
75
|
+
html5.small.attlist &= html5.phrasing.attrs
|
76
|
+
html5.small.content = html5.phrasing.model
|
77
|
+
|
78
|
+
html5.q = element q { html5.q.attlist & html5.q.content }
|
79
|
+
html5.q.attlist &= html5.phrasing.attrs & html5.cite.attr?
|
80
|
+
html5.q.content = html5.phrasing.model
|
81
|
+
|
82
|
+
html5.s = element s { html5.s.attlist & html5.s.content }
|
83
|
+
html5.s.attlist &= html5.phrasing.attrs
|
84
|
+
html5.s.content = html5.phrasing.model
|
85
|
+
|
86
|
+
html5.samp = element samp { html5.samp.attlist & html5.samp.content }
|
87
|
+
html5.samp.attlist &= html5.phrasing.attrs
|
88
|
+
html5.samp.content = html5.phrasing.model
|
89
|
+
|
90
|
+
html5.sub = element sub { html5.sub.attlist & html5.sub.content }
|
91
|
+
html5.sub.attlist &= html5.phrasing.attrs
|
92
|
+
html5.sub.content = html5.phrasing.model
|
93
|
+
|
94
|
+
html5.sup = element sup { html5.sup.attlist & html5.sup.content }
|
95
|
+
html5.sup.attlist &= html5.phrasing.attrs
|
96
|
+
html5.sup.content = html5.phrasing.model
|
97
|
+
|
98
|
+
html5.span = element span { html5.span.attlist & html5.span.content }
|
99
|
+
html5.span.attlist &= html5.phrasing.attrs
|
100
|
+
html5.span.content = html5.phrasing.model
|
101
|
+
|
102
|
+
html5.time = element time { html5.time.attlist & html5.time.content }
|
103
|
+
html5.time.attlist &= html5.phrasing.attrs &
|
104
|
+
((html5.time.pubdate.attr & html5.time.datetime.attr.date-optional-time?)
|
105
|
+
| (html5.time.datetime.attr.date-or-time?))
|
106
|
+
html5.time.pubdate.attr = attribute pubdate { 'pubdate' | '' }
|
107
|
+
html5.time.datetime.attr.date-optional-time = attribute datetime { datatype.html5.date.optional.time }
|
108
|
+
html5.time.datetime.attr.date-or-time = attribute datetime { datatype.html5.date.or.time }
|
109
|
+
html5.time.content = html5.phrasing.model
|
110
|
+
|
111
|
+
html5.var = element var { html5.var.attlist & html5.var.content }
|
112
|
+
html5.var.attlist &= html5.phrasing.attrs
|
113
|
+
html5.var.content = html5.phrasing.model
|
114
|
+
|
115
|
+
html5.wbr = element wbr { html5.wbr.attlist }
|
116
|
+
html5.wbr.attlist &= html5.phrasing.attrs
|
117
|
+
|
118
|
+
html5.u = element u { html5.u.attlist & html5.u.content }
|
119
|
+
html5.u.attlist = html5.phrasing.attrs
|
120
|
+
html5.u.content = html5.phrasing.model
|
121
|
+
|
122
|
+
|
123
|
+
html5.ruby = element ruby { html5.ruby.attlist & html5.ruby.content }
|
124
|
+
html5.ruby.attlist = html5.phrasing.attrs
|
125
|
+
html5.ruby.content = ((html5.phrasing.model, (html5.rt | (html5.rp, html5.rt, html5.rp)))+)
|
126
|
+
|
127
|
+
html5.rt = element rt { html5.rt.attlist & html5.rt.content }
|
128
|
+
html5.rt.attlist &= html5.phrasing.attrs
|
129
|
+
html5.rt.content = html5.phrasing.model
|
130
|
+
|
131
|
+
html5.rp = element rp { html5.rp.attlist & html5.rp.content }
|
132
|
+
html5.rp.attlist &= html5.phrasing.attrs
|
133
|
+
html5.rp.content = html5.phrasing.model
|
134
|
+
|
@@ -0,0 +1,164 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
html5.metadata.class |= html5.script
|
5
|
+
html5.flow.class |= html5.script
|
6
|
+
html5.phrasing.class |= html5.script
|
7
|
+
html5.global.attrs &= html5.global.scripting.attrs
|
8
|
+
html5.body.attlist &= html5.scripting.body.attrs
|
9
|
+
|
10
|
+
html5.script = html5.script.internal | html5.script.external
|
11
|
+
|
12
|
+
|
13
|
+
html5.script.internal = element script { html5.script.internal.attlist & html5.script.internal.content }
|
14
|
+
html5.script.external = element script { html5.script.external.attlist & html5.script.external.content }
|
15
|
+
|
16
|
+
html5.script.internal.attlist &= html5.global.attrs & html5.type.mime.nocharset.attr?
|
17
|
+
html5.script.external.attlist &= html5.global.attrs & html5.src.attr & html5.script.defer.attr?
|
18
|
+
& html5.script.async.attr? & html5.type.mime.nocharset.attr? & html5.charset.attr?
|
19
|
+
|
20
|
+
html5.script.defer.attr = attribute defer { 'defer' | '' }
|
21
|
+
html5.script.async.attr = attribute async { 'async' | '' }
|
22
|
+
|
23
|
+
|
24
|
+
html5.script.internal.content = datatype.html5.script
|
25
|
+
html5.script.external.content = datatype.html5.script.documentation
|
26
|
+
|
27
|
+
html5.global.scripting.attrs &= html5.scripting.onabort.attr?
|
28
|
+
& html5.scripting.onblur.attr?
|
29
|
+
& html5.scripting.oncanplay.attr?
|
30
|
+
& html5.scripting.oncanplaythrough.attr?
|
31
|
+
& html5.scripting.onchange.attr?
|
32
|
+
& html5.scripting.onclick.attr?
|
33
|
+
& html5.scripting.oncontextmenu.attr?
|
34
|
+
& html5.scripting.ondblclick.attr?
|
35
|
+
& html5.scripting.ondrag.attr?
|
36
|
+
& html5.scripting.ondragend.attr?
|
37
|
+
& html5.scripting.ondragenter.attr?
|
38
|
+
& html5.scripting.ondragleave.attr?
|
39
|
+
& html5.scripting.ondragover.attr?
|
40
|
+
& html5.scripting.ondragstart.attr?
|
41
|
+
& html5.scripting.ondrop.attr?
|
42
|
+
& html5.scripting.ondurationchange.attr?
|
43
|
+
& html5.scripting.onemptied.attr?
|
44
|
+
& html5.scripting.onended.attr?
|
45
|
+
& html5.scripting.onerror.attr?
|
46
|
+
& html5.scripting.onfocus.attr?
|
47
|
+
& html5.scripting.oninput.attr?
|
48
|
+
& html5.scripting.oninvalid.attr?
|
49
|
+
& html5.scripting.onkeydown.attr?
|
50
|
+
& html5.scripting.onkeypress.attr?
|
51
|
+
& html5.scripting.onkeyup.attr?
|
52
|
+
& html5.scripting.onload.attr?
|
53
|
+
& html5.scripting.onloadeddata.attr?
|
54
|
+
& html5.scripting.onloadedmetadata.attr?
|
55
|
+
& html5.scripting.onloadstart.attr?
|
56
|
+
& html5.scripting.onmousedown.attr?
|
57
|
+
& html5.scripting.onmousemove.attr?
|
58
|
+
& html5.scripting.onmouseout.attr?
|
59
|
+
& html5.scripting.onmouseover.attr?
|
60
|
+
& html5.scripting.onmouseup.attr?
|
61
|
+
& html5.scripting.onmousewheel.attr?
|
62
|
+
& html5.scripting.onpause.attr?
|
63
|
+
& html5.scripting.onplay.attr?
|
64
|
+
& html5.scripting.onplaying.attr?
|
65
|
+
& html5.scripting.onprogress.attr?
|
66
|
+
& html5.scripting.onratechange.attr?
|
67
|
+
& html5.scripting.onreadystatechange.attr?
|
68
|
+
& html5.scripting.onreset.attr?
|
69
|
+
& html5.scripting.onscroll.attr?
|
70
|
+
& html5.scripting.onseeked.attr?
|
71
|
+
& html5.scripting.onseeking.attr?
|
72
|
+
& html5.scripting.onselect.attr?
|
73
|
+
& html5.scripting.onshow.attr?
|
74
|
+
& html5.scripting.onstalled.attr?
|
75
|
+
& html5.scripting.onsubmit.attr?
|
76
|
+
& html5.scripting.onsuspend.attr?
|
77
|
+
& html5.scripting.ontimeupdate.attr?
|
78
|
+
& html5.scripting.onvolumechange.attr?
|
79
|
+
& html5.scripting.onwaiting.attr?
|
80
|
+
|
81
|
+
|
82
|
+
html5.scripting.onabort.attr = attribute onabort { datatype.html5.js }
|
83
|
+
html5.scripting.onblur.attr = attribute onblur { datatype.html5.js }
|
84
|
+
html5.scripting.oncanplay.attr = attribute oncanplay { datatype.html5.js }
|
85
|
+
html5.scripting.oncanplaythrough.attr = attribute oncanplaythrough { datatype.html5.js }
|
86
|
+
html5.scripting.onchange.attr = attribute onchange { datatype.html5.js }
|
87
|
+
html5.scripting.onclick.attr = attribute onclick { datatype.html5.js }
|
88
|
+
html5.scripting.oncontextmenu.attr = attribute oncontextmenu { datatype.html5.js }
|
89
|
+
html5.scripting.ondblclick.attr = attribute ondblclick { datatype.html5.js }
|
90
|
+
html5.scripting.ondrag.attr = attribute ondrag { datatype.html5.js }
|
91
|
+
html5.scripting.ondragend.attr = attribute ondragend { datatype.html5.js }
|
92
|
+
html5.scripting.ondragenter.attr = attribute ondragenter { datatype.html5.js }
|
93
|
+
html5.scripting.ondragleave.attr = attribute ondragleave { datatype.html5.js }
|
94
|
+
html5.scripting.ondragover.attr = attribute ondragover { datatype.html5.js }
|
95
|
+
html5.scripting.ondragstart.attr = attribute ondragstart { datatype.html5.js }
|
96
|
+
html5.scripting.ondrop.attr = attribute ondrop { datatype.html5.js }
|
97
|
+
html5.scripting.ondurationchange.attr = attribute ondurationchange { datatype.html5.js }
|
98
|
+
html5.scripting.onemptied.attr = attribute onemptied { datatype.html5.js }
|
99
|
+
html5.scripting.onended.attr = attribute onended { datatype.html5.js }
|
100
|
+
html5.scripting.onerror.attr = attribute onerror { datatype.html5.js }
|
101
|
+
html5.scripting.onfocus.attr = attribute onfocus { datatype.html5.js }
|
102
|
+
html5.scripting.oninput.attr = attribute oninput { datatype.html5.js }
|
103
|
+
html5.scripting.oninvalid.attr = attribute oninvalid { datatype.html5.js }
|
104
|
+
html5.scripting.onkeydown.attr = attribute onkeydown { datatype.html5.js }
|
105
|
+
html5.scripting.onkeypress.attr = attribute onkeypress { datatype.html5.js }
|
106
|
+
html5.scripting.onkeyup.attr = attribute onkeyup { datatype.html5.js }
|
107
|
+
html5.scripting.onload.attr = attribute onload { datatype.html5.js }
|
108
|
+
html5.scripting.onloadeddata.attr = attribute onloadeddata { datatype.html5.js }
|
109
|
+
html5.scripting.onloadedmetadata.attr = attribute onloadedmetadata { datatype.html5.js }
|
110
|
+
html5.scripting.onloadstart.attr = attribute onloadstart { datatype.html5.js }
|
111
|
+
html5.scripting.onmousedown.attr = attribute onmousedown { datatype.html5.js }
|
112
|
+
html5.scripting.onmousemove.attr = attribute onmousemove { datatype.html5.js }
|
113
|
+
html5.scripting.onmouseout.attr = attribute onmouseout { datatype.html5.js }
|
114
|
+
html5.scripting.onmouseover.attr = attribute onmouseover { datatype.html5.js }
|
115
|
+
html5.scripting.onmouseup.attr = attribute onmouseup { datatype.html5.js }
|
116
|
+
html5.scripting.onmousewheel.attr = attribute onmousewheel { datatype.html5.js }
|
117
|
+
html5.scripting.onpause.attr = attribute onpause { datatype.html5.js }
|
118
|
+
html5.scripting.onplay.attr = attribute onplay { datatype.html5.js }
|
119
|
+
html5.scripting.onplaying.attr = attribute onplaying { datatype.html5.js }
|
120
|
+
html5.scripting.onprogress.attr = attribute onprogress { datatype.html5.js }
|
121
|
+
html5.scripting.onratechange.attr = attribute onratechange { datatype.html5.js }
|
122
|
+
html5.scripting.onreadystatechange.attr = attribute onreadystatechange { datatype.html5.js }
|
123
|
+
html5.scripting.onreset.attr = attribute onreset { datatype.html5.js }
|
124
|
+
html5.scripting.onscroll.attr = attribute onscroll { datatype.html5.js }
|
125
|
+
html5.scripting.onseeked.attr = attribute onseeked { datatype.html5.js }
|
126
|
+
html5.scripting.onseeking.attr = attribute onseeking { datatype.html5.js }
|
127
|
+
html5.scripting.onselect.attr = attribute onselect { datatype.html5.js }
|
128
|
+
html5.scripting.onshow.attr = attribute onshow { datatype.html5.js }
|
129
|
+
html5.scripting.onstalled.attr = attribute onstalled { datatype.html5.js }
|
130
|
+
html5.scripting.onsubmit.attr = attribute onsubmit { datatype.html5.js }
|
131
|
+
html5.scripting.onsuspend.attr = attribute onsuspend { datatype.html5.js }
|
132
|
+
html5.scripting.ontimeupdate.attr = attribute ontimeupdate { datatype.html5.js }
|
133
|
+
html5.scripting.onvolumechange.attr = attribute onvolumechange { datatype.html5.js }
|
134
|
+
html5.scripting.onwaiting.attr = attribute onwaiting { datatype.html5.js }
|
135
|
+
|
136
|
+
|
137
|
+
html5.scripting.body.attrs = html5.scripting.body.onafterprint.attr?
|
138
|
+
& html5.scripting.body.onbeforeprint.attr?
|
139
|
+
& html5.scripting.body.onbeforeunload.attr?
|
140
|
+
& html5.scripting.body.onhashchange.attr?
|
141
|
+
& html5.scripting.body.onmessage.attr?
|
142
|
+
& html5.scripting.body.onoffline.attr?
|
143
|
+
& html5.scripting.body.ononline.attr?
|
144
|
+
& html5.scripting.body.onpopstate.attr?
|
145
|
+
& html5.scripting.body.onredo.attr?
|
146
|
+
& html5.scripting.body.onresize.attr?
|
147
|
+
& html5.scripting.body.onstorage.attr?
|
148
|
+
& html5.scripting.body.onundo.attr?
|
149
|
+
& html5.scripting.body.onunload.attr?
|
150
|
+
|
151
|
+
|
152
|
+
html5.scripting.body.onafterprint.attr = attribute onafterprint { datatype.html5.js }
|
153
|
+
html5.scripting.body.onbeforeprint.attr = attribute onbeforeprint { datatype.html5.js }
|
154
|
+
html5.scripting.body.onbeforeunload.attr = attribute onbeforeunload { datatype.html5.js }
|
155
|
+
html5.scripting.body.onhashchange.attr = attribute onhashchange { datatype.html5.js }
|
156
|
+
html5.scripting.body.onmessage.attr = attribute onmessage { datatype.html5.js }
|
157
|
+
html5.scripting.body.onoffline.attr = attribute onoffline { datatype.html5.js }
|
158
|
+
html5.scripting.body.ononline.attr = attribute ononline { datatype.html5.js }
|
159
|
+
html5.scripting.body.onpopstate.attr = attribute onpopstate { datatype.html5.js }
|
160
|
+
html5.scripting.body.onredo.attr = attribute onredo { datatype.html5.js }
|
161
|
+
html5.scripting.body.onresize.attr = attribute onresize { datatype.html5.js }
|
162
|
+
html5.scripting.body.onstorage.attr = attribute onstorage { datatype.html5.js }
|
163
|
+
html5.scripting.body.onundo.attr = attribute onundo { datatype.html5.js }
|
164
|
+
html5.scripting.body.onunload.attr = attribute onunload { datatype.html5.js }
|
@@ -0,0 +1,58 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
html5.flow.class |= html5.sections.class | html5.headings.class
|
4
|
+
|
5
|
+
html5.sections.class |= html5.section | html5.article | html5.nav | html5.aside | html5.header | html5.footer | html5.address
|
6
|
+
html5.headings.class |= html5.hgroup | html5.h1 | html5.h2 | html5.h3 | html5.h4 | html5.h5 | html5.h6
|
7
|
+
|
8
|
+
html5.headings.attrs &= html5.global.attrs
|
9
|
+
html5.sections.attrs &= html5.global.attrs
|
10
|
+
|
11
|
+
html5.hgroup = element hgroup {html5.hgroup.attlist & html5.hgroup.content}
|
12
|
+
html5.hgroup.attlist &= html5.headings.attrs
|
13
|
+
html5.hgroup.content = (html5.h1 | html5.h2 | html5.h3 | html5.h4 | html5.h5 | html5.h6)+
|
14
|
+
|
15
|
+
html5.h1 = element h1 {html5.h.attlist, html5.h.content}
|
16
|
+
html5.h2 = element h2 {html5.h.attlist, html5.h.content}
|
17
|
+
html5.h3 = element h3 {html5.h.attlist, html5.h.content}
|
18
|
+
html5.h4 = element h4 {html5.h.attlist, html5.h.content}
|
19
|
+
html5.h5 = element h5 {html5.h.attlist, html5.h.content}
|
20
|
+
html5.h6 = element h6 {html5.h.attlist, html5.h.content}
|
21
|
+
|
22
|
+
html5.h.attlist &= html5.headings.attrs
|
23
|
+
html5.h.content = html5.phrasing.model
|
24
|
+
|
25
|
+
|
26
|
+
html5.section = element section {html5.section.attlist & html5.section.content}
|
27
|
+
html5.section.attlist &= html5.sections.attrs
|
28
|
+
html5.section.content = html5.section.model
|
29
|
+
|
30
|
+
|
31
|
+
html5.article = element article {html5.article.attlist & html5.article.content}
|
32
|
+
html5.article.attlist &= html5.sections.attrs
|
33
|
+
html5.article.content = html5.section.model
|
34
|
+
|
35
|
+
|
36
|
+
html5.nav = element nav { html5.nav.attlist & html5.nav.content }
|
37
|
+
html5.nav.attlist &= html5.sections.attrs
|
38
|
+
html5.nav.content = html5.flow.model
|
39
|
+
|
40
|
+
|
41
|
+
html5.aside = element aside { html5.aside.attlist & html5.aside.content }
|
42
|
+
html5.aside.attlist &= html5.sections.attrs
|
43
|
+
html5.aside.content = html5.flow.model
|
44
|
+
|
45
|
+
|
46
|
+
html5.header = element header { html5.header.attlist & html5.header.content }
|
47
|
+
html5.header.attlist &= html5.sections.attrs
|
48
|
+
html5.header.content = html5.flow.model
|
49
|
+
|
50
|
+
|
51
|
+
html5.footer = element footer { html5.footer.attlist & html5.footer.content }
|
52
|
+
html5.footer.attlist &= html5.sections.attrs
|
53
|
+
html5.footer.content = html5.flow.model
|
54
|
+
|
55
|
+
|
56
|
+
html5.address = element address { html5.address.attlist & html5.address.content }
|
57
|
+
html5.address.attlist &= html5.sections.attrs
|
58
|
+
html5.address.content = html5.flow.model
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
html5.metadata.class |= html5.style.unscoped
|
4
|
+
html5.global.attrs &= html5.style.attr?
|
5
|
+
html5.flow.class |= html5.style.scoped
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
html5.style.unscoped = element style { html5.style.unscoped.attlist, html5.style.content }
|
10
|
+
html5.style.unscoped.attlist &= html5.global.attrs, html5.media.attr?, html5.type.mime.nocharset.attr?
|
11
|
+
|
12
|
+
html5.style.scoped = element style { html5.style.scoped.attlist, html5.style.content }
|
13
|
+
html5.style.scoped.attlist &= html5.global.attrs, html5.media.attr?, html5.type.mime.nocharset.attr?, html5.style.scoped.attr
|
14
|
+
|
15
|
+
html5.style.scoped.attr = attribute scoped {'scoped' | ''}
|
16
|
+
html5.style.content = datatype.style
|
17
|
+
|
18
|
+
html5.style.attr = attribute style { datatype.style }
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<pattern id="id-unique" xmlns="http://purl.oclc.org/dsdl/schematron">
|
3
|
+
<!-- note: assumes that NCName lexical constraints are tested elsewhere -->
|
4
|
+
<let name="id-set" value="//*[@id]"/>
|
5
|
+
<rule context="*[@id]">
|
6
|
+
<assert test="count($id-set[@id = current()/@id]) = 1"
|
7
|
+
>Duplicate ID '<value-of select="current()/@id"/>'</assert>
|
8
|
+
</rule>
|
9
|
+
</pattern>
|
10
|
+
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# This is the Mathematical Markup Language (MathML) 3.0, an XML
|
2
|
+
# application for describing mathematical notation and capturing
|
3
|
+
# both its structure and content.
|
4
|
+
#
|
5
|
+
# Copyright 1998-2009 W3C (MIT, ERCIM, Keio)
|
6
|
+
#
|
7
|
+
# Use and distribution of this code are permitted under the terms
|
8
|
+
# W3C Software Notice and License
|
9
|
+
# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
10
|
+
|
11
|
+
|
12
|
+
default namespace m = "http://www.w3.org/1998/Math/MathML"
|
13
|
+
namespace local = ""
|
14
|
+
|
15
|
+
start = math
|
16
|
+
|
17
|
+
math = element math {math.attributes,MathExpression*}
|
18
|
+
MathExpression = semantics
|
19
|
+
|
20
|
+
NonMathMLAtt = attribute (* - (local:*|m:*)) {xsd:string}
|
21
|
+
|
22
|
+
CommonDeprecatedAtt = attribute other {text}?
|
23
|
+
|
24
|
+
CommonAtt = attribute id {xsd:ID}?,
|
25
|
+
attribute xref {text}?,
|
26
|
+
attribute class {xsd:NMTOKENS}?,
|
27
|
+
attribute style {xsd:string}?,
|
28
|
+
attribute href {xsd:anyURI}?,
|
29
|
+
CommonDeprecatedAtt,
|
30
|
+
NonMathMLAtt*
|
31
|
+
|
32
|
+
|
33
|
+
math.attributes = CommonAtt,
|
34
|
+
attribute display {"block" | "inline"}?,
|
35
|
+
attribute maxwidth {length}?,
|
36
|
+
attribute overflow {"linebreak" | "scroll" | "elide" | "truncate" | "scale"}?,
|
37
|
+
attribute altimg {xsd:anyURI}?,
|
38
|
+
attribute altimg-width {length}?,
|
39
|
+
attribute altimg-height {length}?,
|
40
|
+
attribute altimg-valign {length | "top" | "middle" | "bottom"}?,
|
41
|
+
attribute alttext {text}?,
|
42
|
+
attribute cdgroup {xsd:anyURI}?,
|
43
|
+
math.deprecatedattributes
|
44
|
+
|
45
|
+
# the mathml3-presentation schema adds additional attributes
|
46
|
+
# to the math element, all those valid on mstyle
|
47
|
+
|
48
|
+
math.deprecatedattributes = attribute mode {xsd:string}?,
|
49
|
+
attribute macros {xsd:string}?
|
50
|
+
|
51
|
+
|
52
|
+
name = attribute name {xsd:NCName}
|
53
|
+
cd = attribute cd {xsd:NCName}
|
54
|
+
|
55
|
+
src = attribute src {xsd:anyURI}?
|
56
|
+
|
57
|
+
annotation = element annotation {annotation.attributes,text}
|
58
|
+
|
59
|
+
annotation-xml.model = (MathExpression|anyElement)*
|
60
|
+
|
61
|
+
anyElement = element (* - m:*) {(attribute * {text}|text| anyElement)*}
|
62
|
+
|
63
|
+
annotation-xml = element annotation-xml {annotation.attributes,
|
64
|
+
annotation-xml.model}
|
65
|
+
annotation.attributes = CommonAtt,
|
66
|
+
cd?,
|
67
|
+
name?,
|
68
|
+
DefEncAtt,
|
69
|
+
src?
|
70
|
+
|
71
|
+
DefEncAtt = attribute encoding {xsd:string}?,
|
72
|
+
attribute definitionURL {xsd:anyURI}?
|
73
|
+
|
74
|
+
semantics = element semantics {semantics.attributes,
|
75
|
+
MathExpression,
|
76
|
+
(annotation|annotation-xml)*}
|
77
|
+
semantics.attributes = CommonAtt,DefEncAtt,cd?,name?
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
length = xsd:string {
|
82
|
+
pattern = '\s*((-?[0-9]*(\.[0-9]*)?(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*'
|
83
|
+
}
|
84
|
+
|