nora_mark 0.2beta3 → 0.2beta4

Sign up to get free protection for your applications and to get access to all the features.
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,536 @@
1
+
2
+ # This is the Mathematical Markup Language (MathML) 3.0, an XML
3
+ # application for describing mathematical notation and capturing
4
+ # both its structure and content.
5
+ #
6
+ # Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
7
+ #
8
+ # Use and distribution of this code are permitted under the terms
9
+ # W3C Software Notice and License
10
+ # http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
11
+
12
+ default namespace m = "http://www.w3.org/1998/Math/MathML"
13
+
14
+ MathExpression |= PresentationExpression
15
+
16
+ ImpliedMrow = MathExpression*
17
+
18
+ TableRowExpression = mtr|mlabeledtr
19
+
20
+ TableCellExpression = mtd
21
+
22
+ MstackExpression = MathExpression|mscarries|msline|msrow|msgroup
23
+
24
+ MsrowExpression = MathExpression|none
25
+
26
+ MultiScriptExpression = (MathExpression|none),(MathExpression|none)
27
+
28
+ mpadded-length = xsd:string {
29
+ pattern = '\s*([\+\-]?[0-9]*(\.[0-9]*)?\s*((%?\s*(height|depth|width)?)|e[mx]|in|cm|mm|p[xtc]|((negative)?((very){0,2}thi(n|ck)|medium)mathspace)))\s*' }
30
+
31
+ linestyle = "none" | "solid" | "dashed"
32
+
33
+ verticalalign =
34
+ "top" |
35
+ "bottom" |
36
+ "center" |
37
+ "baseline" |
38
+ "axis"
39
+
40
+ columnalignstyle = "left" | "center" | "right"
41
+
42
+ notationstyle =
43
+ "longdiv" |
44
+ "actuarial" |
45
+ "radical" |
46
+ "box" |
47
+ "roundedbox" |
48
+ "circle" |
49
+ "left" |
50
+ "right" |
51
+ "top" |
52
+ "bottom" |
53
+ "updiagonalstrike" |
54
+ "downdiagonalstrike" |
55
+ "verticalstrike" |
56
+ "horizontalstrike" |
57
+ "madruwb"
58
+
59
+ idref = text
60
+ unsigned-integer = xsd:unsignedLong
61
+ integer = xsd:integer
62
+ number = xsd:decimal
63
+
64
+ character = xsd:string {
65
+ pattern = '\s*\S\s*'}
66
+
67
+ color = xsd:string {
68
+ pattern = '\s*((#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?)|[aA][qQ][uU][aA]|[bB][lL][aA][cC][kK]|[bB][lL][uU][eE]|[fF][uU][cC][hH][sS][iI][aA]|[gG][rR][aA][yY]|[gG][rR][eE][eE][nN]|[lL][iI][mM][eE]|[mM][aA][rR][oO][oO][nN]|[nN][aA][vV][yY]|[oO][lL][iI][vV][eE]|[pP][uU][rR][pP][lL][eE]|[rR][eE][dD]|[sS][iI][lL][vV][eE][rR]|[tT][eE][aA][lL]|[wW][hH][iI][tT][eE]|[yY][eE][lL][lL][oO][wW])\s*'}
69
+
70
+
71
+ group-alignment = "left" | "center" | "right" | "decimalpoint"
72
+ group-alignment-list = list {group-alignment+}
73
+ group-alignment-list-list = xsd:string {
74
+ pattern = '(\s*\{\s*(left|center|right|decimalpoint)(\s+(left|center|right|decimalpoint))*\})*\s*' }
75
+ positive-integer = xsd:positiveInteger
76
+
77
+
78
+ TokenExpression = mi|mn|mo|mtext|mspace|ms
79
+
80
+ token.content = mglyph|malignmark|text
81
+
82
+ mi = element mi {mi.attributes, token.content*}
83
+ mi.attributes =
84
+ CommonAtt,
85
+ CommonPresAtt,
86
+ TokenAtt
87
+
88
+
89
+ mn = element mn {mn.attributes, token.content*}
90
+ mn.attributes =
91
+ CommonAtt,
92
+ CommonPresAtt,
93
+ TokenAtt
94
+
95
+
96
+ mo = element mo {mo.attributes, token.content*}
97
+ mo.attributes =
98
+ CommonAtt,
99
+ CommonPresAtt,
100
+ TokenAtt,
101
+ attribute form {"prefix" | "infix" | "postfix"}?,
102
+ attribute fence {"true" | "false"}?,
103
+ attribute separator {"true" | "false"}?,
104
+ attribute lspace {length}?,
105
+ attribute rspace {length}?,
106
+ attribute stretchy {"true" | "false"}?,
107
+ attribute symmetric {"true" | "false"}?,
108
+ attribute maxsize {length | "infinity"}?,
109
+ attribute minsize {length}?,
110
+ attribute largeop {"true" | "false"}?,
111
+ attribute movablelimits {"true" | "false"}?,
112
+ attribute accent {"true" | "false"}?,
113
+ attribute linebreak {"auto" | "newline" | "nobreak" | "goodbreak" | "badbreak"}?,
114
+ attribute lineleading {length}?,
115
+ attribute linebreakstyle {"before" | "after" | "duplicate" | "infixlinebreakstyle"}?,
116
+ attribute linebreakmultchar {text}?,
117
+ attribute indentalign {"left" | "center" | "right" | "auto" | "id"}?,
118
+ attribute indentshift {length}?,
119
+ attribute indenttarget {idref}?,
120
+ attribute indentalignfirst {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?,
121
+ attribute indentshiftfirst {length | "indentshift"}?,
122
+ attribute indentalignlast {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?,
123
+ attribute indentshiftlast {length | "indentshift"}?
124
+
125
+
126
+ mtext = element mtext {mtext.attributes, token.content*}
127
+ mtext.attributes =
128
+ CommonAtt,
129
+ CommonPresAtt,
130
+ TokenAtt
131
+
132
+
133
+ mspace = element mspace {mspace.attributes, empty}
134
+ mspace.attributes =
135
+ CommonAtt,
136
+ CommonPresAtt,
137
+ TokenAtt,
138
+ attribute width {length}?,
139
+ attribute height {length}?,
140
+ attribute depth {length}?,
141
+ attribute linebreak {"auto" | "newline" | "nobreak" | "goodbreak" | "badbreak" | "indentingnewline"}?
142
+
143
+
144
+ ms = element ms {ms.attributes, token.content*}
145
+ ms.attributes =
146
+ CommonAtt,
147
+ CommonPresAtt,
148
+ TokenAtt,
149
+ attribute lquote {text}?,
150
+ attribute rquote {text}?
151
+
152
+
153
+ mglyph = element mglyph {mglyph.attributes,mglyph.deprecatedattributes,empty}
154
+ mglyph.attributes =
155
+ CommonAtt, CommonPresAtt,
156
+ attribute src {xsd:anyURI}?,
157
+ attribute width {length}?,
158
+ attribute height {length}?,
159
+ attribute valign {length}?,
160
+ attribute alt {text}?
161
+ mglyph.deprecatedattributes =
162
+ attribute index {integer}?,
163
+ attribute mathvariant {"normal" | "bold" | "italic" | "bold-italic" | "double-struck" | "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | "monospace" | "initial" | "tailed" | "looped" | "stretched"}?,
164
+ attribute mathsize {"small" | "normal" | "big" | length}?,
165
+ DeprecatedTokenAtt
166
+
167
+ msline = element msline {msline.attributes,empty}
168
+ msline.attributes =
169
+ CommonAtt, CommonPresAtt,
170
+ attribute position {integer}?,
171
+ attribute length {unsigned-integer}?,
172
+ attribute leftoverhang {length}?,
173
+ attribute rightoverhang {length}?,
174
+ attribute mslinethickness {length | "thin" | "medium" | "thick"}?
175
+
176
+ none = element none {none.attributes,empty}
177
+ none.attributes =
178
+ CommonAtt,
179
+ CommonPresAtt
180
+
181
+ mprescripts = element mprescripts {mprescripts.attributes,empty}
182
+ mprescripts.attributes =
183
+ CommonAtt,
184
+ CommonPresAtt
185
+
186
+
187
+ CommonPresAtt =
188
+ attribute mathcolor {color}?,
189
+ attribute mathbackground {color | "transparent"}?
190
+
191
+ TokenAtt =
192
+ attribute mathvariant {"normal" | "bold" | "italic" | "bold-italic" | "double-struck" | "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | "monospace" | "initial" | "tailed" | "looped" | "stretched"}?,
193
+ attribute mathsize {"small" | "normal" | "big" | length}?,
194
+ attribute dir {"ltr" | "rtl"}?,
195
+ DeprecatedTokenAtt
196
+
197
+ DeprecatedTokenAtt =
198
+ attribute fontfamily {text}?,
199
+ attribute fontweight {"normal" | "bold"}?,
200
+ attribute fontstyle {"normal" | "italic"}?,
201
+ attribute fontsize {length}?,
202
+ attribute color {color}?,
203
+ attribute background {color | "transparent"}?
204
+
205
+ MalignExpression = maligngroup|malignmark
206
+
207
+ malignmark = element malignmark {malignmark.attributes, empty}
208
+ malignmark.attributes =
209
+ CommonAtt, CommonPresAtt,
210
+ attribute edge {"left" | "right"}?
211
+
212
+
213
+ maligngroup = element maligngroup {maligngroup.attributes, empty}
214
+ maligngroup.attributes =
215
+ CommonAtt, CommonPresAtt,
216
+ attribute groupalign {"left" | "center" | "right" | "decimalpoint"}?
217
+
218
+
219
+ PresentationExpression = TokenExpression|MalignExpression|
220
+ mrow|mfrac|msqrt|mroot|mstyle|merror|mpadded|mphantom|
221
+ mfenced|menclose|msub|msup|msubsup|munder|mover|munderover|
222
+ mmultiscripts|mtable|mstack|mlongdiv|maction
223
+
224
+
225
+
226
+ mrow = element mrow {mrow.attributes, MathExpression*}
227
+ mrow.attributes =
228
+ CommonAtt, CommonPresAtt,
229
+ attribute dir {"ltr" | "rtl"}?
230
+
231
+
232
+ mfrac = element mfrac {mfrac.attributes, MathExpression, MathExpression}
233
+ mfrac.attributes =
234
+ CommonAtt, CommonPresAtt,
235
+ attribute linethickness {length | "thin" | "medium" | "thick"}?,
236
+ attribute numalign {"left" | "center" | "right"}?,
237
+ attribute denomalign {"left" | "center" | "right"}?,
238
+ attribute bevelled {"true" | "false"}?
239
+
240
+
241
+ msqrt = element msqrt {msqrt.attributes, ImpliedMrow}
242
+ msqrt.attributes =
243
+ CommonAtt, CommonPresAtt
244
+
245
+
246
+ mroot = element mroot {mroot.attributes, MathExpression, MathExpression}
247
+ mroot.attributes =
248
+ CommonAtt, CommonPresAtt
249
+
250
+
251
+ mstyle = element mstyle {mstyle.attributes, ImpliedMrow}
252
+ mstyle.attributes =
253
+ CommonAtt, CommonPresAtt,
254
+ mstyle.specificattributes,
255
+ mstyle.generalattributes,
256
+ mstyle.deprecatedattributes
257
+
258
+ mstyle.specificattributes =
259
+ attribute scriptlevel {integer}?,
260
+ attribute displaystyle {"true" | "false"}?,
261
+ attribute scriptsizemultiplier {number}?,
262
+ attribute scriptminsize {length}?,
263
+ attribute infixlinebreakstyle {"before" | "after" | "duplicate"}?,
264
+ attribute decimalpoint {character}?
265
+
266
+ mstyle.generalattributes =
267
+ attribute accent {"true" | "false"}?,
268
+ attribute accentunder {"true" | "false"}?,
269
+ attribute align {"left" | "right" | "center"}?,
270
+ attribute alignmentscope {list {("true" | "false") +}}?,
271
+ attribute bevelled {"true" | "false"}?,
272
+ attribute charalign {"left" | "center" | "right"}?,
273
+ attribute charspacing {length | "loose" | "medium" | "tight"}?,
274
+ attribute close {text}?,
275
+ attribute columnalign {list {columnalignstyle+} }?,
276
+ attribute columnlines {list {linestyle +}}?,
277
+ attribute columnspacing {list {(length) +}}?,
278
+ attribute columnspan {positive-integer}?,
279
+ attribute columnwidth {list {("auto" | length | "fit") +}}?,
280
+ attribute crossout {list {("none" | "updiagonalstrike" | "downdiagonalstrike" | "verticalstrike" | "horizontalstrike")*}}?,
281
+ attribute denomalign {"left" | "center" | "right"}?,
282
+ attribute depth {length}?,
283
+ attribute dir {"ltr" | "rtl"}?,
284
+ attribute edge {"left" | "right"}?,
285
+ attribute equalcolumns {"true" | "false"}?,
286
+ attribute equalrows {"true" | "false"}?,
287
+ attribute fence {"true" | "false"}?,
288
+ attribute form {"prefix" | "infix" | "postfix"}?,
289
+ attribute frame {linestyle}?,
290
+ attribute framespacing {list {length, length}}?,
291
+ attribute groupalign {group-alignment-list-list}?,
292
+ attribute height {length}?,
293
+ attribute indentalign {"left" | "center" | "right" | "auto" | "id"}?,
294
+ attribute indentalignfirst {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?,
295
+ attribute indentalignlast {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?,
296
+ attribute indentshift {length}?,
297
+ attribute indentshiftfirst {length | "indentshift"}?,
298
+ attribute indentshiftlast {length | "indentshift"}?,
299
+ attribute indenttarget {idref}?,
300
+ attribute largeop {"true" | "false"}?,
301
+ attribute leftoverhang {length}?,
302
+ attribute length {unsigned-integer}?,
303
+ attribute linebreak {"auto" | "newline" | "nobreak" | "goodbreak" | "badbreak"}?,
304
+ attribute linebreakmultchar {text}?,
305
+ attribute linebreakstyle {"before" | "after" | "duplicate" | "infixlinebreakstyle"}?,
306
+ attribute lineleading {length}?,
307
+ attribute linethickness {length | "thin" | "medium" | "thick"}?,
308
+ attribute location {"w" | "nw" | "n" | "ne" | "e" | "se" | "s" | "sw"}?,
309
+ attribute longdivstyle {"lefttop" | "stackedrightright" | "mediumstackedrightright" | "shortstackedrightright" | "righttop" | "left/\right" | "left)(right" | ":right=right" | "stackedleftleft" | "stackedleftlinetop"}?,
310
+ attribute lquote {text}?,
311
+ attribute lspace {length}?,
312
+ attribute mathsize {"small" | "normal" | "big" | length}?,
313
+ attribute mathvariant {"normal" | "bold" | "italic" | "bold-italic" | "double-struck" | "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | "monospace" | "initial" | "tailed" | "looped" | "stretched"}?,
314
+ attribute maxsize {length | "infinity"}?,
315
+ attribute minlabelspacing {length}?,
316
+ attribute minsize {length}?,
317
+ attribute movablelimits {"true" | "false"}?,
318
+ attribute mslinethickness {length | "thin" | "medium" | "thick"}?,
319
+ attribute notation {text}?,
320
+ attribute numalign {"left" | "center" | "right"}?,
321
+ attribute open {text}?,
322
+ attribute position {integer}?,
323
+ attribute rightoverhang {length}?,
324
+ attribute rowalign {list {verticalalign+} }?,
325
+ attribute rowlines {list {linestyle +}}?,
326
+ attribute rowspacing {list {(length) +}}?,
327
+ attribute rowspan {positive-integer}?,
328
+ attribute rquote {text}?,
329
+ attribute rspace {length}?,
330
+ attribute selection {positive-integer}?,
331
+ attribute separator {"true" | "false"}?,
332
+ attribute separators {text}?,
333
+ attribute shift {integer}?,
334
+ attribute side {"left" | "right" | "leftoverlap" | "rightoverlap"}?,
335
+ attribute stackalign {"left" | "center" | "right" | "decimalpoint"}?,
336
+ attribute stretchy {"true" | "false"}?,
337
+ attribute subscriptshift {length}?,
338
+ attribute superscriptshift {length}?,
339
+ attribute symmetric {"true" | "false"}?,
340
+ attribute valign {length}?,
341
+ attribute width {length}?
342
+
343
+ mstyle.deprecatedattributes =
344
+ DeprecatedTokenAtt,
345
+ attribute veryverythinmathspace {length}?,
346
+ attribute verythinmathspace {length}?,
347
+ attribute thinmathspace {length}?,
348
+ attribute mediummathspace {length}?,
349
+ attribute thickmathspace {length}?,
350
+ attribute verythickmathspace {length}?,
351
+ attribute veryverythickmathspace {length}?
352
+
353
+ math.attributes &= CommonPresAtt
354
+ math.attributes &= mstyle.specificattributes
355
+ math.attributes &= mstyle.generalattributes
356
+
357
+
358
+
359
+
360
+ merror = element merror {merror.attributes, ImpliedMrow}
361
+ merror.attributes =
362
+ CommonAtt, CommonPresAtt
363
+
364
+
365
+ mpadded = element mpadded {mpadded.attributes, ImpliedMrow}
366
+ mpadded.attributes =
367
+ CommonAtt, CommonPresAtt,
368
+ attribute height {mpadded-length}?,
369
+ attribute depth {mpadded-length}?,
370
+ attribute width {mpadded-length}?,
371
+ attribute lspace {mpadded-length}?,
372
+ attribute voffset {mpadded-length}?
373
+
374
+
375
+ mphantom = element mphantom {mphantom.attributes, ImpliedMrow}
376
+ mphantom.attributes =
377
+ CommonAtt, CommonPresAtt
378
+
379
+
380
+ mfenced = element mfenced {mfenced.attributes, MathExpression*}
381
+ mfenced.attributes =
382
+ CommonAtt, CommonPresAtt,
383
+ attribute open {text}?,
384
+ attribute close {text}?,
385
+ attribute separators {text}?
386
+
387
+
388
+ menclose = element menclose {menclose.attributes, ImpliedMrow}
389
+ menclose.attributes =
390
+ CommonAtt, CommonPresAtt,
391
+ attribute notation {text}?
392
+
393
+
394
+ msub = element msub {msub.attributes, MathExpression, MathExpression}
395
+ msub.attributes =
396
+ CommonAtt, CommonPresAtt,
397
+ attribute subscriptshift {length}?
398
+
399
+
400
+ msup = element msup {msup.attributes, MathExpression, MathExpression}
401
+ msup.attributes =
402
+ CommonAtt, CommonPresAtt,
403
+ attribute superscriptshift {length}?
404
+
405
+
406
+ msubsup = element msubsup {msubsup.attributes, MathExpression, MathExpression, MathExpression}
407
+ msubsup.attributes =
408
+ CommonAtt, CommonPresAtt,
409
+ attribute subscriptshift {length}?,
410
+ attribute superscriptshift {length}?
411
+
412
+
413
+ munder = element munder {munder.attributes, MathExpression, MathExpression}
414
+ munder.attributes =
415
+ CommonAtt, CommonPresAtt,
416
+ attribute accentunder {"true" | "false"}?,
417
+ attribute align {"left" | "right" | "center"}?
418
+
419
+
420
+ mover = element mover {mover.attributes, MathExpression, MathExpression}
421
+ mover.attributes =
422
+ CommonAtt, CommonPresAtt,
423
+ attribute accent {"true" | "false"}?,
424
+ attribute align {"left" | "right" | "center"}?
425
+
426
+
427
+ munderover = element munderover {munderover.attributes, MathExpression, MathExpression, MathExpression}
428
+ munderover.attributes =
429
+ CommonAtt, CommonPresAtt,
430
+ attribute accent {"true" | "false"}?,
431
+ attribute accentunder {"true" | "false"}?,
432
+ attribute align {"left" | "right" | "center"}?
433
+
434
+
435
+ mmultiscripts = element mmultiscripts {mmultiscripts.attributes, MathExpression,MultiScriptExpression*,(mprescripts,MultiScriptExpression*)?}
436
+ mmultiscripts.attributes =
437
+ msubsup.attributes
438
+
439
+
440
+ mtable = element mtable {mtable.attributes, TableRowExpression*}
441
+ mtable.attributes =
442
+ CommonAtt, CommonPresAtt,
443
+ attribute align {xsd:string {
444
+ pattern ='\s*(top|bottom|center|baseline|axis)\s*[0-9]*'}}?,
445
+ attribute rowalign {list {verticalalign+} }?,
446
+ attribute columnalign {list {columnalignstyle+} }?,
447
+ attribute groupalign {group-alignment-list-list}?,
448
+ attribute alignmentscope {list {("true" | "false") +}}?,
449
+ attribute columnwidth {list {("auto" | length | "fit") +}}?,
450
+ attribute width {"auto" | length}?,
451
+ attribute rowspacing {list {(length) +}}?,
452
+ attribute columnspacing {list {(length) +}}?,
453
+ attribute rowlines {list {linestyle +}}?,
454
+ attribute columnlines {list {linestyle +}}?,
455
+ attribute frame {linestyle}?,
456
+ attribute framespacing {list {length, length}}?,
457
+ attribute equalrows {"true" | "false"}?,
458
+ attribute equalcolumns {"true" | "false"}?,
459
+ attribute displaystyle {"true" | "false"}?,
460
+ attribute side {"left" | "right" | "leftoverlap" | "rightoverlap"}?,
461
+ attribute minlabelspacing {length}?
462
+
463
+
464
+ mlabeledtr = element mlabeledtr {mlabeledtr.attributes, TableCellExpression+}
465
+ mlabeledtr.attributes =
466
+ mtr.attributes
467
+
468
+
469
+ mtr = element mtr {mtr.attributes, TableCellExpression*}
470
+ mtr.attributes =
471
+ CommonAtt, CommonPresAtt,
472
+ attribute rowalign {"top" | "bottom" | "center" | "baseline" | "axis"}?,
473
+ attribute columnalign {list {columnalignstyle+} }?,
474
+ attribute groupalign {group-alignment-list-list}?
475
+
476
+
477
+ mtd = element mtd {mtd.attributes, ImpliedMrow}
478
+ mtd.attributes =
479
+ CommonAtt, CommonPresAtt,
480
+ attribute rowspan {positive-integer}?,
481
+ attribute columnspan {positive-integer}?,
482
+ attribute rowalign {"top" | "bottom" | "center" | "baseline" | "axis"}?,
483
+ attribute columnalign {columnalignstyle}?,
484
+ attribute groupalign {group-alignment-list}?
485
+
486
+
487
+ mstack = element mstack {mstack.attributes, MstackExpression*}
488
+ mstack.attributes =
489
+ CommonAtt, CommonPresAtt,
490
+ attribute align {xsd:string {
491
+ pattern ='\s*(top|bottom|center|baseline|axis)\s*[0-9]*'}}?,
492
+ attribute stackalign {"left" | "center" | "right" | "decimalpoint"}?,
493
+ attribute charalign {"left" | "center" | "right"}?,
494
+ attribute charspacing {length | "loose" | "medium" | "tight"}?
495
+
496
+
497
+ mlongdiv = element mlongdiv {mlongdiv.attributes, MstackExpression,MstackExpression,MstackExpression+}
498
+ mlongdiv.attributes =
499
+ msgroup.attributes,
500
+ attribute longdivstyle {"lefttop" | "stackedrightright" | "mediumstackedrightright" | "shortstackedrightright" | "righttop" | "left/\right" | "left)(right" | ":right=right" | "stackedleftleft" | "stackedleftlinetop"}?
501
+
502
+
503
+ msgroup = element msgroup {msgroup.attributes, MstackExpression*}
504
+ msgroup.attributes =
505
+ CommonAtt, CommonPresAtt,
506
+ attribute position {integer}?,
507
+ attribute shift {integer}?
508
+
509
+
510
+ msrow = element msrow {msrow.attributes, MsrowExpression*}
511
+ msrow.attributes =
512
+ CommonAtt, CommonPresAtt,
513
+ attribute position {integer}?
514
+
515
+
516
+ mscarries = element mscarries {mscarries.attributes, (MsrowExpression|mscarry)*}
517
+ mscarries.attributes =
518
+ CommonAtt, CommonPresAtt,
519
+ attribute position {integer}?,
520
+ attribute location {"w" | "nw" | "n" | "ne" | "e" | "se" | "s" | "sw"}?,
521
+ attribute crossout {list {("none" | "updiagonalstrike" | "downdiagonalstrike" | "verticalstrike" | "horizontalstrike")*}}?,
522
+ attribute scriptsizemultiplier {number}?
523
+
524
+
525
+ mscarry = element mscarry {mscarry.attributes, MsrowExpression*}
526
+ mscarry.attributes =
527
+ CommonAtt, CommonPresAtt,
528
+ attribute location {"w" | "nw" | "n" | "ne" | "e" | "se" | "s" | "sw"}?,
529
+ attribute crossout {list {("none" | "updiagonalstrike" | "downdiagonalstrike" | "verticalstrike" | "horizontalstrike")*}}?
530
+
531
+
532
+ maction = element maction {maction.attributes, MathExpression+}
533
+ maction.attributes =
534
+ CommonAtt, CommonPresAtt,
535
+ attribute actiontype {text}?,
536
+ attribute selection {positive-integer}?
@@ -0,0 +1,60 @@
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
+
14
+ ContExp = semantics-contexp | cn | ci | csymbol | apply | bind | share | cerror | cbytes | cs
15
+
16
+ cn = element cn {cn.attributes,cn.content}
17
+ cn.content = text
18
+ cn.attributes = attribute type {"integer" | "real" | "double" | "hexdouble"}
19
+
20
+ semantics-ci = element semantics {semantics.attributes,(ci|semantics-ci),
21
+ (annotation|annotation-xml)*}
22
+
23
+ semantics-contexp = element semantics {semantics.attributes,ContExp,
24
+ (annotation|annotation-xml)*}
25
+
26
+ ci = element ci {ci.attributes, ci.content}
27
+ ci.attributes = CommonAtt, ci.type?
28
+ ci.type = attribute type {"integer" | "rational" | "real" | "complex" | "complex-polar" | "complex-cartesian" | "constant" | "function" | "vector" | "list" | "set" | "matrix"}
29
+ ci.content = text
30
+
31
+
32
+ csymbol = element csymbol {csymbol.attributes,csymbol.content}
33
+
34
+ SymbolName = xsd:NCName
35
+ csymbol.attributes = CommonAtt, cd
36
+ csymbol.content = SymbolName
37
+
38
+ BvarQ = bvar*
39
+ bvar = element bvar { ci | semantics-ci}
40
+
41
+ apply = element apply {CommonAtt,apply.content}
42
+ apply.content = ContExp+
43
+
44
+
45
+ bind = element bind {CommonAtt,bind.content}
46
+ bind.content = ContExp,bvar*,ContExp
47
+
48
+ share = element share {CommonAtt, src, empty}
49
+
50
+ cerror = element cerror {cerror.attributes, csymbol, ContExp*}
51
+ cerror.attributes = CommonAtt
52
+
53
+ cbytes = element cbytes {cbytes.attributes, base64}
54
+ cbytes.attributes = CommonAtt
55
+ base64 = xsd:base64Binary
56
+
57
+ cs = element cs {cs.attributes, text}
58
+ cs.attributes = CommonAtt
59
+
60
+ MathExpression |= ContExp
@@ -0,0 +1,4 @@
1
+ Use and distribution of all schemas in this directory are permitted under the terms
2
+ W3C Software Notice and License
3
+ http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
4
+
@@ -0,0 +1,41 @@
1
+ # Lenient-Encryption11-ghc.rnc
2
+ #
3
+ # Copyright 2011 W3C (Massachusetts Institute of Technology,
4
+ # Institut National de Recherche en Informatique et en Automatique,
5
+ # Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
6
+ #
7
+ # Use and distribution of all schemas in this directory are permitted under the terms
8
+ # W3C Software Notice and License
9
+ # http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
10
+
11
+ namespace ds = "http://www.w3.org/2000/09/xmldsig#"
12
+ namespace ds11 = "http://www.w3.org/2009/xmldsig11#"
13
+ namespace xenc = "http://www.w3.org/2001/04/xmlenc#"
14
+ namespace xenc11 = "http://www.w3.org/2009/xmlenc11#"
15
+
16
+ start = anyForeignElementOrEncrypted
17
+ anyForeignElementOrEncrypted =
18
+ element * - xenc:* {
19
+ mixed { security_anyAttribute*, anyForeignElementOrEncrypted* } }
20
+ | xenc_EncryptedData
21
+ | xenc_EncryptedKey
22
+ ds_anyForeignElement = element * - (ds:* | xenc:*) {
23
+ mixed { security_anyAttribute*, security_anyElement* } }
24
+ dsig11_anyForeignElement = element * - ds11:* {
25
+ mixed { security_anyAttribute*, security_anyElement* } }
26
+ xenc_anyForeignElement = element * - xenc:* {
27
+ mixed { security_anyAttribute*, security_anyElement* } }
28
+ xenc11_anyForeignElement = element * - xenc11:* {
29
+ mixed { security_anyAttribute*, security_anyElement* } }
30
+
31
+ include "security_any.rnc"
32
+ include "xmldsig-core-schema.rnc"
33
+ include "xmldsig-allowAnyForeign.rnc"
34
+ include "xmldsig11-schema.rnc"
35
+ include "xmldsig11-allowAnyForeign.rnc"
36
+ include "xenc-schema.rnc"
37
+ include "xenc-allowAnyForeign.rnc"
38
+ include "xenc-schema-11.rnc"
39
+ include "xenc11-allowAnyForeign.rnc"
40
+ include "xmlsec-ghc-schema.rnc"
41
+ include "xmlsec-ghc-allowAnyForeign.rnc"
@@ -0,0 +1,39 @@
1
+ # Lenient-Encryption11.rnc
2
+ #
3
+ # Copyright 2011 W3C (Massachusetts Institute of Technology,
4
+ # Institut National de Recherche en Informatique et en Automatique,
5
+ # Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/
6
+ #
7
+ # Use and distribution of all schemas in this directory are permitted under the terms
8
+ # W3C Software Notice and License
9
+ # http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
10
+
11
+ namespace ds = "http://www.w3.org/2000/09/xmldsig#"
12
+ namespace ds11 = "http://www.w3.org/2009/xmldsig11#"
13
+ namespace xenc = "http://www.w3.org/2001/04/xmlenc#"
14
+ namespace xenc11 = "http://www.w3.org/2009/xmlenc11#"
15
+
16
+ start = anyForeignElementOrEncrypted
17
+ anyForeignElementOrEncrypted =
18
+ element * - xenc:* {
19
+ mixed { security_anyAttribute*, anyForeignElementOrEncrypted* } }
20
+ | xenc_EncryptedData
21
+ | xenc_EncryptedKey
22
+ ds_anyForeignElement = element * - (ds:* | xenc:*) {
23
+ mixed { security_anyAttribute*, security_anyElement* } }
24
+ dsig11_anyForeignElement = element * - ds11:* {
25
+ mixed { security_anyAttribute*, security_anyElement* } }
26
+ xenc_anyForeignElement = element * - xenc:* {
27
+ mixed { security_anyAttribute*, security_anyElement* } }
28
+ xenc11_anyForeignElement = element * - xenc11:* {
29
+ mixed { security_anyAttribute*, security_anyElement* } }
30
+
31
+ include "security_any.rnc"
32
+ include "xmldsig-core-schema.rnc"
33
+ include "xmldsig-allowAnyForeign.rnc"
34
+ include "xmldsig11-schema.rnc"
35
+ include "xmldsig11-allowAnyForeign.rnc"
36
+ include "xenc-schema.rnc"
37
+ include "xenc-allowAnyForeign.rnc"
38
+ include "xenc-schema-11.rnc"
39
+ include "xenc11-allowAnyForeign.rnc"