nora_mark 0.2beta3 → 0.2beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +5 -0
  3. data/Gemfile +2 -0
  4. data/README.md +17 -12
  5. data/example/nora-simple.css +52 -0
  6. data/example/noramark-reference-ja.nora +246 -0
  7. data/example/noramark-reference-ja_00001.xhtml +187 -0
  8. data/lib/nora_mark/html/{abstract_item_writer.rb → abstract_node_writer.rb} +3 -3
  9. data/lib/nora_mark/html/context.rb +3 -21
  10. data/lib/nora_mark/html/frontmatter_writer.rb +33 -0
  11. data/lib/nora_mark/html/generator.rb +122 -100
  12. data/lib/nora_mark/html/pages.rb +3 -9
  13. data/lib/nora_mark/html/paragraph_writer.rb +27 -23
  14. data/lib/nora_mark/html/tag_writer.rb +33 -34
  15. data/lib/nora_mark/html/writer_selector.rb +3 -3
  16. data/lib/nora_mark/node.rb +31 -0
  17. data/lib/nora_mark/parser.kpeg +133 -79
  18. data/lib/nora_mark/parser.kpeg.rb +1822 -1526
  19. data/lib/nora_mark/parser.rb +4 -23
  20. data/lib/nora_mark/version.rb +1 -1
  21. data/lib/nora_mark.rb +7 -2
  22. data/nora_mark.gemspec +1 -0
  23. data/spec/epub30-schemas/epub-nav-30.nvdl +16 -0
  24. data/spec/epub30-schemas/epub-nav-30.rnc +10 -0
  25. data/spec/epub30-schemas/epub-nav-30.sch +72 -0
  26. data/spec/epub30-schemas/epub-svg-30.nvdl +15 -0
  27. data/spec/epub30-schemas/epub-svg-30.rnc +15 -0
  28. data/spec/epub30-schemas/epub-svg-30.sch +10 -0
  29. data/spec/epub30-schemas/epub-xhtml-30.nvdl +15 -0
  30. data/spec/epub30-schemas/epub-xhtml-30.rnc +37 -0
  31. data/spec/epub30-schemas/epub-xhtml-30.sch +377 -0
  32. data/spec/epub30-schemas/epub30-catalog.xml +335 -0
  33. data/spec/epub30-schemas/media-overlay-30.nvdl +14 -0
  34. data/spec/epub30-schemas/media-overlay-30.rnc +46 -0
  35. data/spec/epub30-schemas/media-overlay-30.sch +9 -0
  36. data/spec/epub30-schemas/mod/datatypes.rnc +143 -0
  37. data/spec/epub30-schemas/mod/epub-mathml3-30.rnc +74 -0
  38. data/spec/epub30-schemas/mod/epub-prefix-attr.rnc +8 -0
  39. data/spec/epub30-schemas/mod/epub-ssml-attrs.rnc +11 -0
  40. data/spec/epub30-schemas/mod/epub-svg11-30.rnc +12 -0
  41. data/spec/epub30-schemas/mod/epub-svg11-re.sch +7 -0
  42. data/spec/epub30-schemas/mod/epub-switch.rnc +32 -0
  43. data/spec/epub30-schemas/mod/epub-trigger.rnc +17 -0
  44. data/spec/epub30-schemas/mod/epub-type-attr.rnc +7 -0
  45. data/spec/epub30-schemas/mod/epub-xhtml-mathml3-30.rnc +5 -0
  46. data/spec/epub30-schemas/mod/epub-xhtml-svg11-30.rnc +6 -0
  47. data/spec/epub30-schemas/mod/html5/LICENSE +23 -0
  48. data/spec/epub30-schemas/mod/html5/README +21 -0
  49. data/spec/epub30-schemas/mod/html5/html5-aria-30.rnc +105 -0
  50. data/spec/epub30-schemas/mod/html5/html5-attrib-30.rnc +44 -0
  51. data/spec/epub30-schemas/mod/html5/html5-document-30.rnc +44 -0
  52. data/spec/epub30-schemas/mod/html5/html5-edit-30.rnc +24 -0
  53. data/spec/epub30-schemas/mod/html5/html5-embed-30.rnc +155 -0
  54. data/spec/epub30-schemas/mod/html5/html5-forms-30.rnc +431 -0
  55. data/spec/epub30-schemas/mod/html5/html5-grouping-30.rnc +115 -0
  56. data/spec/epub30-schemas/mod/html5/html5-interactive-30.rnc +86 -0
  57. data/spec/epub30-schemas/mod/html5/html5-models-30.rnc +10 -0
  58. data/spec/epub30-schemas/mod/html5/html5-phrasing-30.rnc +134 -0
  59. data/spec/epub30-schemas/mod/html5/html5-script-30.rnc +164 -0
  60. data/spec/epub30-schemas/mod/html5/html5-sections-30.rnc +58 -0
  61. data/spec/epub30-schemas/mod/html5/html5-style-30.rnc +18 -0
  62. data/spec/epub30-schemas/mod/id-unique.sch +10 -0
  63. data/spec/epub30-schemas/mod/mathml/LICENSE +3 -0
  64. data/spec/epub30-schemas/mod/mathml/mathml3-common.rnc +84 -0
  65. data/spec/epub30-schemas/mod/mathml/mathml3-content.rnc +373 -0
  66. data/spec/epub30-schemas/mod/mathml/mathml3-presentation.rnc +536 -0
  67. data/spec/epub30-schemas/mod/mathml/mathml3-strict-content.rnc +60 -0
  68. data/spec/epub30-schemas/mod/security/LICENSE +4 -0
  69. data/spec/epub30-schemas/mod/security/Lenient-Encryption11-ghc.rnc +41 -0
  70. data/spec/epub30-schemas/mod/security/Lenient-Encryption11.rnc +39 -0
  71. data/spec/epub30-schemas/mod/security/Lenient-Signature-exclusiveC14N.rnc +25 -0
  72. data/spec/epub30-schemas/mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc +32 -0
  73. data/spec/epub30-schemas/mod/security/Lenient-Signature11-properties.rnc +30 -0
  74. data/spec/epub30-schemas/mod/security/Lenient-Signature11.rnc +28 -0
  75. data/spec/epub30-schemas/mod/security/Strict-Encryption.rnc +27 -0
  76. data/spec/epub30-schemas/mod/security/Strict-Signature.rnc +22 -0
  77. data/spec/epub30-schemas/mod/security/exc-c14n.rnc +39 -0
  78. data/spec/epub30-schemas/mod/security/security_any.rnc +15 -0
  79. data/spec/epub30-schemas/mod/security/xenc-allowAnyForeign.rnc +25 -0
  80. data/spec/epub30-schemas/mod/security/xenc-schema-11.rnc +96 -0
  81. data/spec/epub30-schemas/mod/security/xenc-schema.rnc +145 -0
  82. data/spec/epub30-schemas/mod/security/xenc11-allowAnyForeign.rnc +19 -0
  83. data/spec/epub30-schemas/mod/security/xmldsig-allowAnyForeign.rnc +47 -0
  84. data/spec/epub30-schemas/mod/security/xmldsig-core-schema.rnc +276 -0
  85. data/spec/epub30-schemas/mod/security/xmldsig-filter2.rnc +16 -0
  86. data/spec/epub30-schemas/mod/security/xmldsig-properties-schema.rnc +34 -0
  87. data/spec/epub30-schemas/mod/security/xmldsig11-allowAnyForeign.rnc +18 -0
  88. data/spec/epub30-schemas/mod/security/xmldsig11-schema.rnc +133 -0
  89. data/spec/epub30-schemas/mod/security/xmlsec-ghc-allowAnyForeign.rnc +21 -0
  90. data/spec/epub30-schemas/mod/security/xmlsec-ghc-schema.rnc +42 -0
  91. data/spec/epub30-schemas/mod/svg11/LICENSE +1 -0
  92. data/spec/epub30-schemas/mod/svg11/README.txt +8 -0
  93. data/spec/epub30-schemas/mod/svg11/svg11-flat.rnc +3999 -0
  94. data/spec/epub30-schemas/ocf-container-30.rnc +16 -0
  95. data/spec/epub30-schemas/ocf-encryption-30.rnc +12 -0
  96. data/spec/epub30-schemas/ocf-signatures-30.rnc +8 -0
  97. data/spec/epub30-schemas/package-30.nvdl +14 -0
  98. data/spec/epub30-schemas/package-30.rnc +91 -0
  99. data/spec/epub30-schemas/package-30.sch +137 -0
  100. data/spec/jing-20091111/bin/jing.jar +0 -0
  101. data/spec/nora_mark_spec.rb +229 -68
  102. data/spec/spec_helper.rb +16 -0
  103. metadata +179 -6
  104. data/lib/nora_mark/html/header_writer.rb +0 -35
  105. data/spec/fixture/test_src_ja.nora +0 -50
@@ -0,0 +1,335 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
3
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-nav-30.nvdl"
4
+ uri="epub-nav-30.nvdl"/>
5
+
6
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-nav-30.rnc"
7
+ uri="epub-nav-30.rnc"/>
8
+
9
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-nav-30.sch"
10
+ uri="epub-nav-30.sch"/>
11
+
12
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-svg-30.nvdl"
13
+ uri="epub-svg-30.nvdl"/>
14
+
15
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-svg-30.rnc"
16
+ uri="epub-svg-30.rnc"/>
17
+
18
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-svg-30.sch"
19
+ uri="epub-svg-30.sch"/>
20
+
21
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-xhtml-30.nvdl"
22
+ uri="epub-xhtml-30.nvdl"/>
23
+
24
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-xhtml-30.rnc"
25
+ uri="epub-xhtml-30.rnc"/>
26
+
27
+ <system systemId="http://www.idpf.org/epub/30/schema/epub-xhtml-30.sch"
28
+ uri="epub-xhtml-30.sch"/>
29
+
30
+ <system systemId="http://www.idpf.org/epub/30/schema/media-overlay-30.nvdl"
31
+ uri="media-overlay-30.nvdl"/>
32
+
33
+ <system systemId="http://www.idpf.org/epub/30/schema/media-overlay-30.rnc"
34
+ uri="media-overlay-30.rnc"/>
35
+
36
+ <system systemId="http://www.idpf.org/epub/30/schema/media-overlay-30.sch"
37
+ uri="media-overlay-30.sch"/>
38
+
39
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/datatypes.rnc"
40
+ uri="mod/datatypes.rnc"/>
41
+ <system systemId="datatypes.rnc" uri="mod/datatypes.rnc"/>
42
+
43
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-mathml3-30.rnc"
44
+ uri="mod/epub-mathml3-30.rnc"/>
45
+ <system systemId="epub-mathml3-30.rnc" uri="mod/epub-mathml3-30.rnc"/>
46
+
47
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-prefix-attr.rnc"
48
+ uri="mod/epub-prefix-attr.rnc"/>
49
+ <system systemId="epub-prefix-attr.rnc" uri="mod/epub-prefix-attr.rnc"/>
50
+
51
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-ssml-attrs.rnc"
52
+ uri="mod/epub-ssml-attrs.rnc"/>
53
+ <system systemId="epub-ssml-attrs.rnc" uri="mod/epub-ssml-attrs.rnc"/>
54
+
55
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-svg11-30.rnc"
56
+ uri="mod/epub-svg11-30.rnc"/>
57
+ <system systemId="epub-svg11-30.rnc" uri="mod/epub-svg11-30.rnc"/>
58
+
59
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-svg11-re.sch"
60
+ uri="mod/epub-svg11-re.sch"/>
61
+ <system systemId="epub-svg11-re.sch" uri="mod/epub-svg11-re.sch"/>
62
+
63
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-switch.rnc"
64
+ uri="mod/epub-switch.rnc"/>
65
+ <system systemId="epub-switch.rnc" uri="mod/epub-switch.rnc"/>
66
+
67
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-trigger.rnc"
68
+ uri="mod/epub-trigger.rnc"/>
69
+ <system systemId="epub-trigger.rnc" uri="mod/epub-trigger.rnc"/>
70
+
71
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-type-attr.rnc"
72
+ uri="mod/epub-type-attr.rnc"/>
73
+ <system systemId="epub-type-attr.rnc" uri="mod/epub-type-attr.rnc"/>
74
+
75
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-xhtml-mathml3-30.rnc"
76
+ uri="mod/epub-xhtml-mathml3-30.rnc"/>
77
+ <system systemId="epub-xhtml-mathml3-30.rnc" uri="mod/epub-xhtml-mathml3-30.rnc"/>
78
+
79
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/epub-xhtml-svg11-30.rnc"
80
+ uri="mod/epub-xhtml-svg11-30.rnc"/>
81
+ <system systemId="epub-xhtml-svg11-30.rnc" uri="mod/epub-xhtml-svg11-30.rnc"/>
82
+
83
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-aria-30.rnc"
84
+ uri="mod/html5/html5-aria-30.rnc"/>
85
+ <system systemId="html5/html5-aria-30.rnc" uri="mod/html5/html5-aria-30.rnc"/>
86
+ <system systemId="html5-aria-30.rnc" uri="mod/html5/html5-aria-30.rnc"/>
87
+
88
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-attrib-30.rnc"
89
+ uri="mod/html5/html5-attrib-30.rnc"/>
90
+ <system systemId="html5/html5-attrib-30.rnc" uri="mod/html5/html5-attrib-30.rnc"/>
91
+ <system systemId="html5-attrib-30.rnc" uri="mod/html5/html5-attrib-30.rnc"/>
92
+
93
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-document-30.rnc"
94
+ uri="mod/html5/html5-document-30.rnc"/>
95
+ <system systemId="html5/html5-document-30.rnc" uri="mod/html5/html5-document-30.rnc"/>
96
+ <system systemId="html5-document-30.rnc" uri="mod/html5/html5-document-30.rnc"/>
97
+
98
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-edit-30.rnc"
99
+ uri="mod/html5/html5-edit-30.rnc"/>
100
+ <system systemId="html5/html5-edit-30.rnc" uri="mod/html5/html5-edit-30.rnc"/>
101
+ <system systemId="html5-edit-30.rnc" uri="mod/html5/html5-edit-30.rnc"/>
102
+
103
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-embed-30.rnc"
104
+ uri="mod/html5/html5-embed-30.rnc"/>
105
+ <system systemId="html5/html5-embed-30.rnc" uri="mod/html5/html5-embed-30.rnc"/>
106
+ <system systemId="html5-embed-30.rnc" uri="mod/html5/html5-embed-30.rnc"/>
107
+
108
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-forms-30.rnc"
109
+ uri="mod/html5/html5-forms-30.rnc"/>
110
+ <system systemId="html5/html5-forms-30.rnc" uri="mod/html5/html5-forms-30.rnc"/>
111
+ <system systemId="html5-forms-30.rnc" uri="mod/html5/html5-forms-30.rnc"/>
112
+
113
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-grouping-30.rnc"
114
+ uri="mod/html5/html5-grouping-30.rnc"/>
115
+ <system systemId="html5/html5-grouping-30.rnc" uri="mod/html5/html5-grouping-30.rnc"/>
116
+ <system systemId="html5-grouping-30.rnc" uri="mod/html5/html5-grouping-30.rnc"/>
117
+
118
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-interactive-30.rnc"
119
+ uri="mod/html5/html5-interactive-30.rnc"/>
120
+ <system systemId="html5/html5-interactive-30.rnc"
121
+ uri="mod/html5/html5-interactive-30.rnc"/>
122
+ <system systemId="html5-interactive-30.rnc" uri="mod/html5/html5-interactive-30.rnc"/>
123
+
124
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-models-30.rnc"
125
+ uri="mod/html5/html5-models-30.rnc"/>
126
+ <system systemId="html5/html5-models-30.rnc" uri="mod/html5/html5-models-30.rnc"/>
127
+ <system systemId="html5-models-30.rnc" uri="mod/html5/html5-models-30.rnc"/>
128
+
129
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-phrasing-30.rnc"
130
+ uri="mod/html5/html5-phrasing-30.rnc"/>
131
+ <system systemId="html5/html5-phrasing-30.rnc" uri="mod/html5/html5-phrasing-30.rnc"/>
132
+ <system systemId="html5-phrasing-30.rnc" uri="mod/html5/html5-phrasing-30.rnc"/>
133
+
134
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-script-30.rnc"
135
+ uri="mod/html5/html5-script-30.rnc"/>
136
+ <system systemId="html5/html5-script-30.rnc" uri="mod/html5/html5-script-30.rnc"/>
137
+ <system systemId="html5-script-30.rnc" uri="mod/html5/html5-script-30.rnc"/>
138
+
139
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-sections-30.rnc"
140
+ uri="mod/html5/html5-sections-30.rnc"/>
141
+ <system systemId="html5/html5-sections-30.rnc" uri="mod/html5/html5-sections-30.rnc"/>
142
+ <system systemId="html5-sections-30.rnc" uri="mod/html5/html5-sections-30.rnc"/>
143
+
144
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/html5/html5-style-30.rnc"
145
+ uri="mod/html5/html5-style-30.rnc"/>
146
+ <system systemId="html5/html5-style-30.rnc" uri="mod/html5/html5-style-30.rnc"/>
147
+ <system systemId="html5-style-30.rnc" uri="mod/html5/html5-style-30.rnc"/>
148
+
149
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/id-unique.sch"
150
+ uri="mod/id-unique.sch"/>
151
+ <system systemId="id-unique.sch" uri="mod/id-unique.sch"/>
152
+
153
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/mathml/mathml3-common.rnc"
154
+ uri="mod/mathml/mathml3-common.rnc"/>
155
+ <system systemId="mathml/mathml3-common.rnc" uri="mod/mathml/mathml3-common.rnc"/>
156
+ <system systemId="mathml3-common.rnc" uri="mod/mathml/mathml3-common.rnc"/>
157
+
158
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/mathml/mathml3-content.rnc"
159
+ uri="mod/mathml/mathml3-content.rnc"/>
160
+ <system systemId="mathml/mathml3-content.rnc" uri="mod/mathml/mathml3-content.rnc"/>
161
+ <system systemId="mathml3-content.rnc" uri="mod/mathml/mathml3-content.rnc"/>
162
+
163
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/mathml/mathml3-presentation.rnc"
164
+ uri="mod/mathml/mathml3-presentation.rnc"/>
165
+ <system systemId="mathml/mathml3-presentation.rnc"
166
+ uri="mod/mathml/mathml3-presentation.rnc"/>
167
+ <system systemId="mathml3-presentation.rnc" uri="mod/mathml/mathml3-presentation.rnc"/>
168
+
169
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/mathml/mathml3-strict-content.rnc"
170
+ uri="mod/mathml/mathml3-strict-content.rnc"/>
171
+ <system systemId="mathml/mathml3-strict-content.rnc"
172
+ uri="mod/mathml/mathml3-strict-content.rnc"/>
173
+ <system systemId="mathml3-strict-content.rnc"
174
+ uri="mod/mathml/mathml3-strict-content.rnc"/>
175
+
176
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Lenient-Encryption11-ghc.rnc"
177
+ uri="mod/security/Lenient-Encryption11-ghc.rnc"/>
178
+ <system systemId="security/Lenient-Encryption11-ghc.rnc"
179
+ uri="mod/security/Lenient-Encryption11-ghc.rnc"/>
180
+ <system systemId="Lenient-Encryption11-ghc.rnc"
181
+ uri="mod/security/Lenient-Encryption11-ghc.rnc"/>
182
+
183
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Lenient-Encryption11.rnc"
184
+ uri="mod/security/Lenient-Encryption11.rnc"/>
185
+ <system systemId="security/Lenient-Encryption11.rnc"
186
+ uri="mod/security/Lenient-Encryption11.rnc"/>
187
+ <system systemId="Lenient-Encryption11.rnc" uri="mod/security/Lenient-Encryption11.rnc"/>
188
+
189
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Lenient-Signature-exclusiveC14N.rnc"
190
+ uri="mod/security/Lenient-Signature-exclusiveC14N.rnc"/>
191
+ <system systemId="security/Lenient-Signature-exclusiveC14N.rnc"
192
+ uri="mod/security/Lenient-Signature-exclusiveC14N.rnc"/>
193
+ <system systemId="Lenient-Signature-exclusiveC14N.rnc"
194
+ uri="mod/security/Lenient-Signature-exclusiveC14N.rnc"/>
195
+
196
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc"
197
+ uri="mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc"/>
198
+ <system systemId="security/Lenient-Signature11-properties-exclusiveC14N.rnc"
199
+ uri="mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc"/>
200
+ <system systemId="Lenient-Signature11-properties-exclusiveC14N.rnc"
201
+ uri="mod/security/Lenient-Signature11-properties-exclusiveC14N.rnc"/>
202
+
203
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Lenient-Signature11-properties.rnc"
204
+ uri="mod/security/Lenient-Signature11-properties.rnc"/>
205
+ <system systemId="security/Lenient-Signature11-properties.rnc"
206
+ uri="mod/security/Lenient-Signature11-properties.rnc"/>
207
+ <system systemId="Lenient-Signature11-properties.rnc"
208
+ uri="mod/security/Lenient-Signature11-properties.rnc"/>
209
+
210
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Lenient-Signature11.rnc"
211
+ uri="mod/security/Lenient-Signature11.rnc"/>
212
+ <system systemId="security/Lenient-Signature11.rnc"
213
+ uri="mod/security/Lenient-Signature11.rnc"/>
214
+ <system systemId="Lenient-Signature11.rnc" uri="mod/security/Lenient-Signature11.rnc"/>
215
+
216
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Strict-Encryption.rnc"
217
+ uri="mod/security/Strict-Encryption.rnc"/>
218
+ <system systemId="security/Strict-Encryption.rnc"
219
+ uri="mod/security/Strict-Encryption.rnc"/>
220
+ <system systemId="Strict-Encryption.rnc" uri="mod/security/Strict-Encryption.rnc"/>
221
+
222
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/Strict-Signature.rnc"
223
+ uri="mod/security/Strict-Signature.rnc"/>
224
+ <system systemId="security/Strict-Signature.rnc"
225
+ uri="mod/security/Strict-Signature.rnc"/>
226
+ <system systemId="Strict-Signature.rnc" uri="mod/security/Strict-Signature.rnc"/>
227
+
228
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/exc-c14n.rnc"
229
+ uri="mod/security/exc-c14n.rnc"/>
230
+ <system systemId="security/exc-c14n.rnc" uri="mod/security/exc-c14n.rnc"/>
231
+ <system systemId="exc-c14n.rnc" uri="mod/security/exc-c14n.rnc"/>
232
+
233
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/security_any.rnc"
234
+ uri="mod/security/security_any.rnc"/>
235
+ <system systemId="security/security_any.rnc" uri="mod/security/security_any.rnc"/>
236
+ <system systemId="security_any.rnc" uri="mod/security/security_any.rnc"/>
237
+
238
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xenc-allowAnyForeign.rnc"
239
+ uri="mod/security/xenc-allowAnyForeign.rnc"/>
240
+ <system systemId="security/xenc-allowAnyForeign.rnc"
241
+ uri="mod/security/xenc-allowAnyForeign.rnc"/>
242
+ <system systemId="xenc-allowAnyForeign.rnc" uri="mod/security/xenc-allowAnyForeign.rnc"/>
243
+
244
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xenc-schema-11.rnc"
245
+ uri="mod/security/xenc-schema-11.rnc"/>
246
+ <system systemId="security/xenc-schema-11.rnc" uri="mod/security/xenc-schema-11.rnc"/>
247
+ <system systemId="xenc-schema-11.rnc" uri="mod/security/xenc-schema-11.rnc"/>
248
+
249
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xenc-schema.rnc"
250
+ uri="mod/security/xenc-schema.rnc"/>
251
+ <system systemId="security/xenc-schema.rnc" uri="mod/security/xenc-schema.rnc"/>
252
+ <system systemId="xenc-schema.rnc" uri="mod/security/xenc-schema.rnc"/>
253
+
254
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xenc11-allowAnyForeign.rnc"
255
+ uri="mod/security/xenc11-allowAnyForeign.rnc"/>
256
+ <system systemId="security/xenc11-allowAnyForeign.rnc"
257
+ uri="mod/security/xenc11-allowAnyForeign.rnc"/>
258
+ <system systemId="xenc11-allowAnyForeign.rnc"
259
+ uri="mod/security/xenc11-allowAnyForeign.rnc"/>
260
+
261
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmldsig-allowAnyForeign.rnc"
262
+ uri="mod/security/xmldsig-allowAnyForeign.rnc"/>
263
+ <system systemId="security/xmldsig-allowAnyForeign.rnc"
264
+ uri="mod/security/xmldsig-allowAnyForeign.rnc"/>
265
+ <system systemId="xmldsig-allowAnyForeign.rnc"
266
+ uri="mod/security/xmldsig-allowAnyForeign.rnc"/>
267
+
268
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmldsig-core-schema.rnc"
269
+ uri="mod/security/xmldsig-core-schema.rnc"/>
270
+ <system systemId="security/xmldsig-core-schema.rnc"
271
+ uri="mod/security/xmldsig-core-schema.rnc"/>
272
+ <system systemId="xmldsig-core-schema.rnc" uri="mod/security/xmldsig-core-schema.rnc"/>
273
+
274
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmldsig-filter2.rnc"
275
+ uri="mod/security/xmldsig-filter2.rnc"/>
276
+ <system systemId="security/xmldsig-filter2.rnc" uri="mod/security/xmldsig-filter2.rnc"/>
277
+ <system systemId="xmldsig-filter2.rnc" uri="mod/security/xmldsig-filter2.rnc"/>
278
+
279
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmldsig-properties-schema.rnc"
280
+ uri="mod/security/xmldsig-properties-schema.rnc"/>
281
+ <system systemId="security/xmldsig-properties-schema.rnc"
282
+ uri="mod/security/xmldsig-properties-schema.rnc"/>
283
+ <system systemId="xmldsig-properties-schema.rnc"
284
+ uri="mod/security/xmldsig-properties-schema.rnc"/>
285
+
286
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmldsig11-allowAnyForeign.rnc"
287
+ uri="mod/security/xmldsig11-allowAnyForeign.rnc"/>
288
+ <system systemId="security/xmldsig11-allowAnyForeign.rnc"
289
+ uri="mod/security/xmldsig11-allowAnyForeign.rnc"/>
290
+ <system systemId="xmldsig11-allowAnyForeign.rnc"
291
+ uri="mod/security/xmldsig11-allowAnyForeign.rnc"/>
292
+
293
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmldsig11-schema.rnc"
294
+ uri="mod/security/xmldsig11-schema.rnc"/>
295
+ <system systemId="security/xmldsig11-schema.rnc"
296
+ uri="mod/security/xmldsig11-schema.rnc"/>
297
+ <system systemId="xmldsig11-schema.rnc" uri="mod/security/xmldsig11-schema.rnc"/>
298
+
299
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmlsec-ghc-allowAnyForeign.rnc"
300
+ uri="mod/security/xmlsec-ghc-allowAnyForeign.rnc"/>
301
+ <system systemId="security/xmlsec-ghc-allowAnyForeign.rnc"
302
+ uri="mod/security/xmlsec-ghc-allowAnyForeign.rnc"/>
303
+ <system systemId="xmlsec-ghc-allowAnyForeign.rnc"
304
+ uri="mod/security/xmlsec-ghc-allowAnyForeign.rnc"/>
305
+
306
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/security/xmlsec-ghc-schema.rnc"
307
+ uri="mod/security/xmlsec-ghc-schema.rnc"/>
308
+ <system systemId="security/xmlsec-ghc-schema.rnc"
309
+ uri="mod/security/xmlsec-ghc-schema.rnc"/>
310
+ <system systemId="xmlsec-ghc-schema.rnc" uri="mod/security/xmlsec-ghc-schema.rnc"/>
311
+
312
+ <system systemId="http://www.idpf.org/epub/30/schema/mod/svg11/svg11-flat.rnc"
313
+ uri="mod/svg11/svg11-flat.rnc"/>
314
+ <system systemId="svg11/svg11-flat.rnc" uri="mod/svg11/svg11-flat.rnc"/>
315
+ <system systemId="svg11-flat.rnc" uri="mod/svg11/svg11-flat.rnc"/>
316
+
317
+ <system systemId="http://www.idpf.org/epub/30/schema/ocf-container-30.rnc"
318
+ uri="ocf-container-30.rnc"/>
319
+
320
+ <system systemId="http://www.idpf.org/epub/30/schema/ocf-encryption-30.rnc"
321
+ uri="ocf-encryption-30.rnc"/>
322
+
323
+ <system systemId="http://www.idpf.org/epub/30/schema/ocf-signatures-30.rnc"
324
+ uri="ocf-signatures-30.rnc"/>
325
+
326
+ <system systemId="http://www.idpf.org/epub/30/schema/package-30.nvdl"
327
+ uri="package-30.nvdl"/>
328
+
329
+ <system systemId="http://www.idpf.org/epub/30/schema/package-30.rnc"
330
+ uri="package-30.rnc"/>
331
+
332
+ <system systemId="http://www.idpf.org/epub/30/schema/package-30.sch"
333
+ uri="package-30.sch"/>
334
+
335
+ </catalog>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0" startMode="smil">
3
+ <mode name="smil">
4
+ <namespace ns="http://www.w3.org/ns/SMIL">
5
+ <validate schema="media-overlay-30.rnc" schemaType="application/relax-ng-compact-syntax"/>
6
+ <validate schema="media-overlay-30.sch"/>
7
+ </namespace>
8
+ </mode>
9
+ <mode name="attach">
10
+ <anyNamespace>
11
+ <attach/>
12
+ </anyNamespace>
13
+ </mode>
14
+ </rules>
@@ -0,0 +1,46 @@
1
+ default namespace = "http://www.w3.org/ns/SMIL"
2
+ namespace epub = "http://www.idpf.org/2007/ops"
3
+
4
+ include "./mod/epub-type-attr.rnc"
5
+ include "./mod/epub-prefix-attr.rnc"
6
+ include "./mod/datatypes.rnc"
7
+
8
+ start = element smil { smil.attlist & smil.content }
9
+ smil.attlist = smil.version.attr & smil.id.attr? & epub.prefix.attr.ns?
10
+ smil.content = smil.head?, smil.body
11
+
12
+ smil.head = element head { smil.metadata? }
13
+
14
+ smil.metadata = element metadata { smil.metadata.content }
15
+ smil.metadata.content = anyElement*
16
+
17
+ smil.body = element body { smil.body.attlist & smil.body.content }
18
+ smil.body.attlist = smil.tc.attrs & epub.textref.attr?
19
+ smil.body.content = (smil.seq | smil.par)+
20
+
21
+ smil.seq = element seq { smil.seq.attlist & smil.seq.content }
22
+ smil.seq.attlist = smil.tc.attrs & epub.textref.attr
23
+ smil.seq.content = (smil.seq | smil.par)+
24
+
25
+ smil.par = element par {smil.par.attlist & smil.par.content }
26
+ smil.par.attlist = smil.tc.attrs
27
+ smil.par.content = smil.text, smil.audio?
28
+
29
+ smil.text = element \text { smil.text.attlist }
30
+ smil.text.attlist = smil.id.attr? & smil.src.attr
31
+
32
+ smil.audio = element audio { smil.audio.attlist }
33
+ smil.audio.attlist = smil.id.attr? & attribute clipBegin { datatype.smil.npt }? & attribute clipEnd { datatype.smil.npt }? & smil.src.attr
34
+
35
+ smil.tc.attrs = epub.type.attr? & smil.id.attr?
36
+ smil.src.attr = attribute src { datatype.URI }
37
+ smil.id.attr = attribute id { datatype.ID }
38
+ smil.i18n.attrs = smil.xml.lang.attr? & smil.dir.attr?
39
+ smil.xml.lang.attr = attribute xml:lang { datatype.languagecode }
40
+ smil.dir.attr = attribute dir { 'ltr' | 'rtl' }
41
+ smil.version.attr = attribute version { '3.0' }
42
+ epub.textref.attr = attribute epub:textref { datatype.URI }
43
+ smil.name.attr = attribute name { datatype.string }
44
+ smil.content.attr = attribute content {datatype.string }
45
+
46
+ anyElement = element * { (attribute * { text } | text | anyElement)* }
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <schema xmlns="http://purl.oclc.org/dsdl/schematron">
3
+
4
+ <ns uri="http://www.idpf.org/2007/ops" prefix="epub"/>
5
+ <ns uri="http://www.w3.org/ns/SMIL" prefix="s"/>
6
+
7
+ <include href="./mod/id-unique.sch"/>
8
+
9
+ </schema>
@@ -0,0 +1,143 @@
1
+ [ xml:id = "datatypes-common" ]
2
+ div {
3
+ datatype.ID = datatype.ID.lexical
4
+ datatype.IDREF = datatype.IDREF.lexical
5
+ datatype.IDREFS = datatype.IDREFS.lexical
6
+
7
+ datatype.languagecode = datatype.BCP47
8
+ # http://www.w3.org/TR/xmlschema11-2/#language
9
+ datatype.BCP47 = xsd:language { pattern = "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*" }
10
+ # http://www.w3.org/TR/xmlschema11-2/#ID
11
+ datatype.ID.xsd = xsd:ID
12
+ # http://www.w3.org/TR/xmlschema11-2/#NCName
13
+ datatype.IDREF.lexical = xsd:NCName
14
+ datatype.IDREFS.lexical = list { datatype.IDREF.lexical+ }
15
+ datatype.ID.lexical = xsd:NCName
16
+ # http://www.w3.org/TR/xmlschema11-2/#IDREF
17
+ datatype.IDREF.xsd = xsd:IDREF
18
+ # http://www.w3.org/TR/xmlschema11-2/#IDREFS
19
+ datatype.IDREFS.xsd = xsd:IDREFS
20
+ # http://www.w3.org/TR/xmlschema11-2/#NMTOKEN
21
+ datatype.NMTOKEN = xsd:NMTOKEN
22
+ # http://www.w3.org/TR/xmlschema11-2/#NMTOKENS
23
+ datatype.NMTOKENS = xsd:NMTOKENS
24
+ # http://www.w3.org/TR/xmlschema11-2/#string
25
+ datatype.string = xsd:string
26
+ datatype.string.nonempty = xsd:token { minLength='1' }
27
+ datatype.text = text
28
+ # http://www.w3.org/TR/xmlschema11-2/#nt-dateRep
29
+ datatype.date = xsd:date
30
+ # http://www.w3.org/TR/xmlschema11-2/#nt-dateTimeRep
31
+ datatype.dateTime = xsd:dateTime
32
+ # http://www.w3.org/TR/xmlschema11-2/#nt-timeRep
33
+ datatype.date.or.dateTime = datatype.date | datatype.dateTime
34
+ datatype.LEIRI = xsd:anyURI
35
+ # http://www.w3.org/TR/xmlschema11-2/#anyURI
36
+ # http://tools.ietf.org/html/rfc3986#appendix-B
37
+ # http://www.w3.org/TR/html5/urls.html#valid-url-potentially-surrounded-by-spaces
38
+ datatype.URI = xsd:anyURI
39
+ datatype.URI.absolute = xsd:anyURI
40
+ datatype.IRI = datatype.URI
41
+ datatype.character.encoding = datatype.iana.charset
42
+ datatype.iana.charset = xsd:NMTOKEN
43
+ # http://www.w3.org/TR/html5/infrastructure.html#valid-mime-type
44
+ # http://tools.ietf.org/html/rfc4288#section-4.2
45
+ # http://tools.ietf.org/html/rfc2616#section-3.7
46
+ datatype.mimetype = xsd:string { pattern='[a-zA-Z0-9!#$&+\-\^_]+/[a-zA-Z0-9!#$&+\-\^_]+.*' }
47
+ datatype.mimetype.nocharset = datatype.mimetype
48
+ # http://www.w3.org/TR/xmlschema11-2/#nonNegativeInteger
49
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#non-negative-integers
50
+ datatype.non-negative.integer = xsd:nonNegativeInteger
51
+ # http://www.w3.org/TR/xmlschema11-2/#positiveInteger
52
+ datatype.positive.integer = xsd:positiveInteger
53
+ # http://www.w3.org/TR/xmlschema11-2/#integer
54
+ datatype.integer = xsd:integer
55
+ # http://www.w3.org/TR/xmlschema11-2/#nt-floatRep
56
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#real-numbers
57
+ datatype.float = xsd:float
58
+ datatype.float.positive = xsd:float { minExclusive = '0'}
59
+ datatype.float.non-negative = xsd:float { minInclusive = '0' }
60
+
61
+ }
62
+ [ xml:id = "datatypes-smil" ]
63
+ div {
64
+ # http://www.w3.org/TR/smil/smil-timing.html#TimingSyntax-Full-clock-value
65
+ # http://www.w3.org/TR/smil/smil-timing.html#TimingSyntax-Partial-clock-value
66
+ # http://www.w3.org/TR/smil/smil-timing.html#TimingSyntax-Timecount-value
67
+ datatype.smil.npt =
68
+ xsd:string { pattern = "(\s*)[0-9]+:[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(\s*)" }
69
+ | xsd:string { pattern = "(\s*)[0-5][0-9]:[0-5][0-9](\.[0-9]+)?(\s*)" }
70
+ | xsd:string { pattern = "(\s*)[0-9]+(\.[0-9]+)?(h|min|s|ms)?(\s*)" }
71
+ }
72
+
73
+ [ xml:id = "datatypes-vocab" ]
74
+ div {
75
+ datatype.property = xsd:NMTOKEN
76
+ datatype.properties = xsd:NMTOKENS
77
+ datatype.prefixdecl = text #\s*([\i-[:]][\c-[:]]*: +[^ ]+)(\s+[\i-[:]][\c-[:]]*: +[^ ]+)*\s*
78
+ }
79
+
80
+ [ xml:id = "datatypes-ssml" ]
81
+ div {
82
+ # http://www.w3.org/TR/speech-synthesis11/#edef_phoneme
83
+ datatype.ssml.PhoneticExpression = xsd:string
84
+ datatype.ssml.PhoneticAlphabet = xsd:string { pattern = "(ipa|x-.+)" }
85
+ }
86
+
87
+ [ xml:id = "datatypes-html5" ]
88
+ div {
89
+ datatype.html5.browsing.context.name.or.keyword = xsd:string { pattern = "()|([^_].*)|(_[bB][lL][aA][nN][kK])|(_[sS][eE][lL][fF])|(_[pP][aA][rR][eE][nN][tT])|(_[tT][oO][pP])" }
90
+ datatype.html5.browsing.context.name = xsd:string { pattern = "()|([^_].*)" }
91
+ datatype.html5.token = xsd:string { pattern = '[^\s]+' }
92
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#space-separated-tokens
93
+ datatype.html5.space.separated.tokens = list { datatype.html5.token* }
94
+ datatype.html5.ordered.set.unique.tokens = datatype.html5.space.separated.tokens
95
+ datatype.html5.URL.spaces = datatype.URI
96
+ # http://dev.w3.org/csswg/css3-mediaqueries/#syntax
97
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#mq
98
+ datatype.html5.media.query = xsd:string
99
+ datatype.html5.name = xsd:string
100
+ datatype.html5.name.reference = xsd:string { pattern = "#.+" }
101
+
102
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#months
103
+ datatype.html5.month = xsd:token { pattern ='([0-9]{4,})-([0-9]{2})' }
104
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#dates
105
+ datatype.html5.date = xsd:token { pattern ='([0-9]{4,})-([0-9]{2})-([0-9]{2})'}
106
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#times
107
+ datatype.html5.time = xsd:token { pattern ='([0-9]{2}):([0-9]{2})(:[0-9]{2}(\.[0-9]+)?)?'}
108
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#local-dates-and-times
109
+ datatype.html5.datetime.local = xsd:token { pattern = '([0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(:[0-9]{2}(\.[0-9]+)?)?' }
110
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#global-dates-and-times
111
+ datatype.html5.datetime.global = xsd:token { pattern = '([0-9]{4,})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2})(:[0-9]{2}(\.[0-9]+)?)?(Z|((\+|-)([0-9]{2}):([0-9]{2})))' }
112
+ datatype.html5.datetime = datatype.html5.datetime.global
113
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#vaguer-moments-in-time
114
+ datatype.html5.date.or.time = datatype.html5.date | datatype.html5.time | datatype.html5.datetime.global
115
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#vaguer-moments-in-time
116
+ datatype.html5.date.optional.time = datatype.html5.date | datatype.html5.datetime.global
117
+ datatype.html5.week = xsd:token { pattern ='([0-9]{4,})-W([0-9]{2})' }
118
+
119
+ datatype.html5.accesskey = datatype.html5.ordered.set.unique.tokens
120
+ datatype.html5.coords.rectangle = xsd:token { pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+" }
121
+ datatype.html5.coords.circle = xsd:token { pattern = "-?[0-9]+,-?[0-9]+,[0-9]+" }
122
+ datatype.html5.coords.poly = xsd:token { pattern = "-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+,-?[0-9]+(,-?[0-9]+,-?[0-9]+)*" }
123
+ datatype.html5.js = xsd:string
124
+ datatype.html5.script = xsd:string
125
+ datatype.html5.script.documentation = xsd:string
126
+ datatype.html5.iframe.srcdoc.xml = xsd:string
127
+ datatype.style = xsd:string
128
+ datatype.html5.sizes = list { xsd:string { pattern = "[1-9][0-9]*x[1-9][0-9]*" }+ }
129
+ datatype.html5.emailaddress = xsd:string { pattern = "[^@]+@[^@]+" }
130
+ datatype.html5.emailaddresslist = xsd:string { pattern = "([^@]+@[^@]+,)*([^@]+@[^@]+)" }
131
+ # http://www.w3.org/TR/html5/common-microsyntaxes.html#colors
132
+ datatype.html5.color = xsd:string { pattern = '#([A-Fa-f0-9]{6})' }
133
+ }
134
+
135
+ [ xml:id = "datatypes-html5forms" ]
136
+ div {
137
+ datatype.html5.forms.mimetypelist = xsd:string
138
+ # http://www.w3.org/TR/html5/forms.html#attr-form-accept-charset
139
+ datatype.html5.forms.charsetlist = list { datatype.character.encoding+ }
140
+ datatype.html5.forms.pattern = xsd:string
141
+ datatype.html5.forms.string.nolinebreaks = xsd:string
142
+ }
143
+
@@ -0,0 +1,74 @@
1
+
2
+
3
+ default namespace m = "http://www.w3.org/1998/Math/MathML"
4
+ namespace local = ""
5
+ namespace x = "http://www.w3.org/1999/xhtml"
6
+ namespace ev = "http://www.w3.org/2001/xml-events"
7
+ namespace ssml = "http://www.w3.org/2001/10/synthesis"
8
+
9
+ include "mathml/mathml3-common.rnc" {
10
+ start = element math { math.attributes & MathExpression+ }
11
+
12
+ # redefine annotation-xml to point to ops specialization and allow validation of content mathml
13
+ annotation-xml =
14
+ element annotation-xml {
15
+ html5.annotation.xml.attlist & html5.annotation.xml.content
16
+ }
17
+
18
+ # redefine to refer to datatype proxy and remove deprecated attributes
19
+ CommonAtt =
20
+ attribute id { parent datatype.ID }?,
21
+ attribute xref { parent datatype.IDREF }?,
22
+ attribute class { parent datatype.NMTOKENS }?,
23
+ attribute style { parent datatype.string }?,
24
+ attribute href { parent datatype.URI }?,
25
+ NonMathMLAtt*
26
+
27
+ CommonAtt &= parent epub.ssml.ph.attr?
28
+
29
+ # remove deprecated attributes
30
+ math.deprecatedattributes = empty
31
+ semantics.attributes = CommonAtt
32
+
33
+ # extend to circumvent datatype collisions
34
+ NonMathMLAtt =
35
+ attribute * - (local:* | m:* | xml:* | x:* | ev:* | ssml:*) {
36
+ parent datatype.string
37
+ }
38
+ }
39
+
40
+ html5.annotation.xml.attlist =
41
+ CommonAtt
42
+ & attribute cd { "mathmlkeys" }?
43
+ & attribute name { "contentequiv" | "alternate-representation" }?
44
+ & attribute definitionURL { parent datatype.URI }?
45
+
46
+ # The choice pattern for combinations of values of @encoding and actual xml annotation content.
47
+ html5.annotation.xml.content |=
48
+ (attribute encoding { "application/mathml-content+xml" | "MathML-Content" },
49
+ (src | ContExp+))
50
+ | (attribute encoding { "application/mathml-presentation+xml" | "MathML-Presentation" },
51
+ (src | MathExpression+))
52
+ | (attribute encoding { "application/xhtml+xml" },
53
+ parent html5.flow.model)
54
+
55
+ # add xml:base
56
+ CommonAtt &= parent html5.xml.base.attr?
57
+
58
+ include "mathml/mathml3-presentation.rnc" {
59
+ # redefine to refer to datatype proxy
60
+ idref = parent datatype.IDREF
61
+
62
+ # remove deprecated
63
+ mglyph.deprecatedattributes = empty
64
+ DeprecatedTokenAtt = empty
65
+ mstyle.deprecatedattributes = empty
66
+ }
67
+
68
+ include "mathml/mathml3-content.rnc" {
69
+ # as ops allows presentation mathml only at top level, kill the contribution to MathExpression
70
+ MathExpression |= notAllowed
71
+
72
+ # remove deprecated
73
+ DeprecatedContExp = empty
74
+ }
@@ -0,0 +1,8 @@
1
+
2
+
3
+ namespace epub = "http://www.idpf.org/2007/ops"
4
+
5
+ html5.html.attlist &= epub.prefix.attr.ns?
6
+
7
+ epub.prefix.attr = attribute prefix { datatype.prefixdecl }
8
+ epub.prefix.attr.ns = attribute epub:prefix { datatype.prefixdecl }