mml 2.3.0 → 2.3.2

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 (336) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +9 -0
  3. data/.rubocop.yml +4 -0
  4. data/.rubocop_todo.yml +83 -18
  5. data/Gemfile +0 -2
  6. data/README.adoc +176 -47
  7. data/Rakefile +16 -1
  8. data/lib/mml/base/common_attributes.rb +44 -0
  9. data/lib/mml/base/content/annotation.rb +28 -0
  10. data/lib/mml/base/content/annotation_xml.rb +31 -0
  11. data/lib/mml/base/content/apply.rb +27 -0
  12. data/lib/mml/base/content/arith.rb +243 -0
  13. data/lib/mml/base/content/bind.rb +27 -0
  14. data/lib/mml/base/content/bvar.rb +20 -0
  15. data/lib/mml/base/content/calculus.rb +103 -0
  16. data/lib/mml/base/content/cbytes.rb +24 -0
  17. data/lib/mml/base/content/cerror.rb +24 -0
  18. data/lib/mml/base/content/ci.rb +77 -0
  19. data/lib/mml/base/content/cn.rb +33 -0
  20. data/lib/mml/base/content/condition.rb +20 -0
  21. data/lib/mml/base/content/constants.rb +173 -0
  22. data/lib/mml/base/content/cs.rb +22 -0
  23. data/lib/mml/base/content/csymbol.rb +79 -0
  24. data/lib/mml/base/content/declare.rb +34 -0
  25. data/lib/mml/base/content/degree.rb +20 -0
  26. data/lib/mml/base/content/elementary_functions.rb +309 -0
  27. data/lib/mml/base/content/fn.rb +25 -0
  28. data/lib/mml/base/content/functions.rb +85 -0
  29. data/lib/mml/base/content/interval.rb +24 -0
  30. data/lib/mml/base/content/inverse.rb +25 -0
  31. data/lib/mml/base/content/lambda.rb +20 -0
  32. data/lib/mml/base/content/linear_algebra.rb +122 -0
  33. data/lib/mml/base/content/logic.rb +93 -0
  34. data/lib/mml/base/content/otherwise.rb +20 -0
  35. data/lib/mml/base/content/piece.rb +20 -0
  36. data/lib/mml/base/content/piecewise.rb +20 -0
  37. data/lib/mml/base/content/relations.rb +113 -0
  38. data/lib/mml/base/content/reln.rb +19 -0
  39. data/lib/mml/base/content/semantics.rb +27 -0
  40. data/lib/mml/base/content/sep.rb +19 -0
  41. data/lib/mml/base/content/sets.rb +163 -0
  42. data/lib/mml/base/content/share.rb +22 -0
  43. data/lib/mml/base/content/statistics.rb +95 -0
  44. data/lib/mml/base/content/vector_calculus.rb +63 -0
  45. data/lib/mml/base/content_loader.rb +195 -0
  46. data/lib/mml/base/maction.rb +1 -0
  47. data/lib/mml/base/math.rb +47 -0
  48. data/lib/mml/base/menclose.rb +1 -1
  49. data/lib/mml/base/mfenced.rb +2 -2
  50. data/lib/mml/base/mglyph.rb +2 -2
  51. data/lib/mml/base/mi.rb +9 -6
  52. data/lib/mml/base/mlabeledtr.rb +2 -6
  53. data/lib/mml/base/mn.rb +3 -2
  54. data/lib/mml/base/mo.rb +3 -3
  55. data/lib/mml/base/mrow.rb +0 -2
  56. data/lib/mml/base/ms.rb +4 -6
  57. data/lib/mml/base/mscarries.rb +1 -1
  58. data/lib/mml/base/mspace.rb +0 -2
  59. data/lib/mml/base/mstyle.rb +4 -8
  60. data/lib/mml/base/mtable.rb +8 -0
  61. data/lib/mml/base/mtd.rb +6 -0
  62. data/lib/mml/base/mtext.rb +0 -2
  63. data/lib/mml/base/semantics.rb +4 -2
  64. data/lib/mml/base/universal_presentation_attributes.rb +46 -0
  65. data/lib/mml/base/v3_common.rb +16 -0
  66. data/lib/mml/base/v3_presentation_attributes.rb +15 -0
  67. data/lib/mml/base/v4_attributes.rb +4 -18
  68. data/lib/mml/base.rb +11 -0
  69. data/lib/mml/common_elements.rb +336 -0
  70. data/lib/mml/context_configuration.rb +29 -0
  71. data/lib/mml/v2/annotation.rb +9 -0
  72. data/lib/mml/v2/annotation_xml.rb +9 -0
  73. data/lib/mml/v2/apply.rb +9 -0
  74. data/lib/mml/v2/arith.rb +93 -0
  75. data/lib/mml/v2/bind.rb +9 -0
  76. data/lib/mml/v2/bvar.rb +9 -0
  77. data/lib/mml/v2/calculus.rb +33 -0
  78. data/lib/mml/v2/ci.rb +9 -0
  79. data/lib/mml/v2/cn.rb +9 -0
  80. data/lib/mml/v2/common_elements.rb +34 -0
  81. data/lib/mml/v2/condition.rb +9 -0
  82. data/lib/mml/v2/configuration.rb +13 -0
  83. data/lib/mml/v2/constants.rb +65 -0
  84. data/lib/mml/v2/csymbol.rb +9 -0
  85. data/lib/mml/v2/degree.rb +9 -0
  86. data/lib/mml/v2/elementary_functions.rb +121 -0
  87. data/lib/mml/v2/fn.rb +9 -0
  88. data/lib/mml/v2/functions.rb +29 -0
  89. data/lib/mml/v2/interval.rb +9 -0
  90. data/lib/mml/v2/inverse.rb +9 -0
  91. data/lib/mml/v2/lambda.rb +9 -0
  92. data/lib/mml/v2/linear_algebra.rb +41 -0
  93. data/lib/mml/v2/logic.rb +33 -0
  94. data/lib/mml/v2/maction.rb +9 -0
  95. data/lib/mml/v2/maligngroup.rb +9 -0
  96. data/lib/mml/v2/malignmark.rb +9 -0
  97. data/lib/mml/v2/math.rb +11 -0
  98. data/lib/mml/v2/menclose.rb +9 -0
  99. data/lib/mml/v2/merror.rb +9 -0
  100. data/lib/mml/v2/mfenced.rb +9 -0
  101. data/lib/mml/v2/mfrac.rb +9 -0
  102. data/lib/mml/v2/mfraction.rb +9 -0
  103. data/lib/mml/v2/mglyph.rb +9 -0
  104. data/lib/mml/v2/mi.rb +9 -0
  105. data/lib/mml/v2/mlabeledtr.rb +9 -0
  106. data/lib/mml/v2/mlongdiv.rb +9 -0
  107. data/lib/mml/v2/mmultiscripts.rb +9 -0
  108. data/lib/mml/v2/mn.rb +9 -0
  109. data/lib/mml/v2/mo.rb +10 -0
  110. data/lib/mml/v2/mover.rb +9 -0
  111. data/lib/mml/v2/mpadded.rb +9 -0
  112. data/lib/mml/v2/mphantom.rb +9 -0
  113. data/lib/mml/v2/mprescripts.rb +9 -0
  114. data/lib/mml/v2/mroot.rb +9 -0
  115. data/lib/mml/v2/mrow.rb +9 -0
  116. data/lib/mml/v2/ms.rb +9 -0
  117. data/lib/mml/v2/mscarries.rb +9 -0
  118. data/lib/mml/v2/mscarry.rb +9 -0
  119. data/lib/mml/v2/msgroup.rb +9 -0
  120. data/lib/mml/v2/msline.rb +9 -0
  121. data/lib/mml/v2/mspace.rb +9 -0
  122. data/lib/mml/v2/msqrt.rb +9 -0
  123. data/lib/mml/v2/msrow.rb +9 -0
  124. data/lib/mml/v2/mstack.rb +9 -0
  125. data/lib/mml/v2/mstyle.rb +10 -0
  126. data/lib/mml/v2/msub.rb +9 -0
  127. data/lib/mml/v2/msubsup.rb +9 -0
  128. data/lib/mml/v2/msup.rb +9 -0
  129. data/lib/mml/v2/mtable.rb +9 -0
  130. data/lib/mml/v2/mtd.rb +9 -0
  131. data/lib/mml/v2/mtext.rb +9 -0
  132. data/lib/mml/v2/mtr.rb +9 -0
  133. data/lib/mml/v2/munder.rb +9 -0
  134. data/lib/mml/v2/munderover.rb +9 -0
  135. data/lib/mml/v2/namespace.rb +7 -0
  136. data/lib/mml/v2/none.rb +9 -0
  137. data/lib/mml/v2/otherwise.rb +9 -0
  138. data/lib/mml/v2/piece.rb +9 -0
  139. data/lib/mml/v2/piecewise.rb +9 -0
  140. data/lib/mml/v2/relations.rb +41 -0
  141. data/lib/mml/v2/reln.rb +13 -0
  142. data/lib/mml/v2/semantics.rb +9 -0
  143. data/lib/mml/v2/sep.rb +9 -0
  144. data/lib/mml/v2/sets.rb +57 -0
  145. data/lib/mml/v2/statistics.rb +33 -0
  146. data/lib/mml/v2/vector_calculus.rb +21 -0
  147. data/lib/mml/v2.rb +311 -0
  148. data/lib/mml/v3/annotation.rb +10 -0
  149. data/lib/mml/v3/annotation_xml.rb +10 -0
  150. data/lib/mml/v3/apply.rb +10 -0
  151. data/lib/mml/v3/arith.rb +115 -0
  152. data/lib/mml/v3/bind.rb +10 -0
  153. data/lib/mml/v3/calculus.rb +40 -0
  154. data/lib/mml/v3/cbytes.rb +10 -0
  155. data/lib/mml/v3/cerror.rb +10 -0
  156. data/lib/mml/v3/ci.rb +10 -0
  157. data/lib/mml/v3/cn.rb +10 -0
  158. data/lib/mml/v3/common_elements.rb +34 -0
  159. data/lib/mml/v3/constants.rb +80 -0
  160. data/lib/mml/v3/constructs.rb +55 -0
  161. data/lib/mml/v3/cs.rb +10 -0
  162. data/lib/mml/v3/csymbol.rb +10 -0
  163. data/lib/mml/v3/deprecated_content.rb +29 -0
  164. data/lib/mml/v3/elementary_functions.rb +145 -0
  165. data/lib/mml/v3/functions.rb +35 -0
  166. data/lib/mml/v3/linear_algebra.rb +50 -0
  167. data/lib/mml/v3/logic.rb +40 -0
  168. data/lib/mml/v3/maction.rb +1 -1
  169. data/lib/mml/v3/math.rb +7 -1
  170. data/lib/mml/v3/mi.rb +1 -0
  171. data/lib/mml/v3/mn.rb +1 -0
  172. data/lib/mml/v3/mo.rb +1 -0
  173. data/lib/mml/v3/mrow.rb +1 -0
  174. data/lib/mml/v3/ms.rb +1 -0
  175. data/lib/mml/v3/mstyle.rb +1 -0
  176. data/lib/mml/v3/mtext.rb +1 -0
  177. data/lib/mml/v3/relations.rb +50 -0
  178. data/lib/mml/v3/sets.rb +70 -0
  179. data/lib/mml/v3/statistics.rb +40 -0
  180. data/lib/mml/v3/vector_calculus.rb +25 -0
  181. data/lib/mml/v3.rb +25 -0
  182. data/lib/mml/v4/a.rb +4 -3
  183. data/lib/mml/v4/annotation.rb +10 -0
  184. data/lib/mml/v4/annotation_xml.rb +14 -0
  185. data/lib/mml/v4/apply.rb +9 -0
  186. data/lib/mml/v4/arith.rb +93 -0
  187. data/lib/mml/v4/calculus.rb +25 -0
  188. data/lib/mml/v4/cbytes.rb +9 -0
  189. data/lib/mml/v4/cerror.rb +9 -0
  190. data/lib/mml/v4/ci.rb +9 -0
  191. data/lib/mml/v4/cn.rb +9 -0
  192. data/lib/mml/v4/common_elements.rb +33 -0
  193. data/lib/mml/v4/constants.rb +65 -0
  194. data/lib/mml/v4/constructs.rb +49 -0
  195. data/lib/mml/v4/cs.rb +9 -0
  196. data/lib/mml/v4/csymbol.rb +9 -0
  197. data/lib/mml/v4/deprecated_content.rb +25 -0
  198. data/lib/mml/v4/elementary_functions.rb +118 -0
  199. data/lib/mml/v4/factorof.rb +9 -0
  200. data/lib/mml/v4/functions.rb +30 -0
  201. data/lib/mml/v4/limit.rb +9 -0
  202. data/lib/mml/v4/linear_algebra.rb +41 -0
  203. data/lib/mml/v4/logic.rb +33 -0
  204. data/lib/mml/v4/maction.rb +1 -2
  205. data/lib/mml/v4/maligngroup.rb +0 -1
  206. data/lib/mml/v4/malignmark.rb +0 -1
  207. data/lib/mml/v4/math.rb +1 -1
  208. data/lib/mml/v4/menclose.rb +0 -1
  209. data/lib/mml/v4/merror.rb +0 -1
  210. data/lib/mml/v4/mfenced.rb +0 -1
  211. data/lib/mml/v4/mfrac.rb +0 -1
  212. data/lib/mml/v4/mfraction.rb +0 -1
  213. data/lib/mml/v4/mglyph.rb +0 -1
  214. data/lib/mml/v4/mi.rb +1 -1
  215. data/lib/mml/v4/mlabeledtr.rb +0 -1
  216. data/lib/mml/v4/mlongdiv.rb +0 -1
  217. data/lib/mml/v4/mmultiscripts.rb +0 -1
  218. data/lib/mml/v4/mn.rb +1 -1
  219. data/lib/mml/v4/mo.rb +1 -1
  220. data/lib/mml/v4/mover.rb +0 -1
  221. data/lib/mml/v4/mpadded.rb +0 -1
  222. data/lib/mml/v4/mphantom.rb +0 -1
  223. data/lib/mml/v4/mprescripts.rb +0 -1
  224. data/lib/mml/v4/mroot.rb +0 -1
  225. data/lib/mml/v4/mrow.rb +1 -1
  226. data/lib/mml/v4/ms.rb +1 -1
  227. data/lib/mml/v4/mscarries.rb +0 -1
  228. data/lib/mml/v4/mscarry.rb +0 -1
  229. data/lib/mml/v4/msgroup.rb +0 -1
  230. data/lib/mml/v4/msline.rb +0 -1
  231. data/lib/mml/v4/mspace.rb +0 -1
  232. data/lib/mml/v4/msqrt.rb +0 -1
  233. data/lib/mml/v4/msrow.rb +0 -1
  234. data/lib/mml/v4/mstack.rb +0 -1
  235. data/lib/mml/v4/mstyle.rb +1 -1
  236. data/lib/mml/v4/msub.rb +0 -1
  237. data/lib/mml/v4/msubsup.rb +0 -1
  238. data/lib/mml/v4/msup.rb +0 -1
  239. data/lib/mml/v4/mtable.rb +0 -1
  240. data/lib/mml/v4/mtd.rb +0 -1
  241. data/lib/mml/v4/mtext.rb +1 -1
  242. data/lib/mml/v4/mtr.rb +0 -1
  243. data/lib/mml/v4/munder.rb +0 -1
  244. data/lib/mml/v4/munderover.rb +0 -1
  245. data/lib/mml/v4/none.rb +0 -1
  246. data/lib/mml/v4/relations.rb +37 -0
  247. data/lib/mml/v4/semantics.rb +0 -1
  248. data/lib/mml/v4/sets.rb +57 -0
  249. data/lib/mml/v4/statistics.rb +33 -0
  250. data/lib/mml/v4/tendsto.rb +9 -0
  251. data/lib/mml/v4/vector_calculus.rb +21 -0
  252. data/lib/mml/v4.rb +421 -44
  253. data/lib/mml/version.rb +1 -1
  254. data/lib/mml/versioned_parser.rb +1 -1
  255. data/lib/mml.rb +3 -1
  256. data/reference-docs/mathml-source/pubtext/mathmlspec.dtd +150 -0
  257. data/reference-docs/mathml-source/pubtext/xmlspec.dtd +2649 -0
  258. data/reference-docs/mathml-source/readme.txt +40 -0
  259. data/reference-docs/mathml-source/run +296 -0
  260. data/reference-docs/mathml-source/style/html/html2xhtml.xsl +216 -0
  261. data/reference-docs/mathml-source/style/html/images.xsl +98 -0
  262. data/reference-docs/mathml-source/style/html/mml6.xsl +1156 -0
  263. data/reference-docs/mathml-source/style/html/mmldiff.xsl +566 -0
  264. data/reference-docs/mathml-source/style/html/mmlspec.xsl +2531 -0
  265. data/reference-docs/mathml-source/style/html/slices-common.xsl +312 -0
  266. data/reference-docs/mathml-source/style/html/slices.xsl +48 -0
  267. data/reference-docs/mathml-source/style/html/xmlspec.xsl +2542 -0
  268. data/reference-docs/mathml-source/style/pdf/mathmlspec.xsl +2510 -0
  269. data/reference-docs/mathml-source/xml/changes.xml +773 -0
  270. data/reference-docs/mathml-source/xml/character-set.xml +1011 -0
  271. data/reference-docs/mathml-source/xml/content-element-def.xml +6143 -0
  272. data/reference-docs/mathml-source/xml/content-markup.xml +8178 -0
  273. data/reference-docs/mathml-source/xml/contributors.xml +425 -0
  274. data/reference-docs/mathml-source/xml/dom-bindings.xml +20 -0
  275. data/reference-docs/mathml-source/xml/dom-intro.xml +114 -0
  276. data/reference-docs/mathml-source/xml/fundamentals.xml +1646 -0
  277. data/reference-docs/mathml-source/xml/glossary.xml +519 -0
  278. data/reference-docs/mathml-source/xml/interface.xml +1096 -0
  279. data/reference-docs/mathml-source/xml/introduction.xml +724 -0
  280. data/reference-docs/mathml-source/xml/mathml-css-sample.xml +304 -0
  281. data/reference-docs/mathml-source/xml/mathml-dom.xml +3813 -0
  282. data/reference-docs/mathml-source/xml/mathml-spec.xml +356 -0
  283. data/reference-docs/mathml-source/xml/mixing.xml +982 -0
  284. data/reference-docs/mathml-source/xml/operator-dict.xml +551 -0
  285. data/reference-docs/mathml-source/xml/parsing.xml +2565 -0
  286. data/reference-docs/mathml-source/xml/presentation-markup.xml +6834 -0
  287. data/reference-docs/mathml-source/xml/references.xml +323 -0
  288. data/reference-docs/mathml-source/xml/validation-grammar.xml +877 -0
  289. data/schemas/README.adoc +17 -0
  290. data/schemas/mathml2/common/common-attribs.xsd +41 -0
  291. data/schemas/mathml2/common/math.xsd +126 -0
  292. data/schemas/mathml2/common/xlink-href.xsd +20 -0
  293. data/schemas/mathml2/content/CVS/Entries +16 -0
  294. data/schemas/mathml2/content/CVS/Repository +1 -0
  295. data/schemas/mathml2/content/CVS/Root +1 -0
  296. data/schemas/mathml2/content/arith.xsd +90 -0
  297. data/schemas/mathml2/content/calculus.xsd +146 -0
  298. data/schemas/mathml2/content/common-attrib.xsd +30 -0
  299. data/schemas/mathml2/content/constants.xsd +83 -0
  300. data/schemas/mathml2/content/constructs.xsd +260 -0
  301. data/schemas/mathml2/content/elementary-functions.xsd +117 -0
  302. data/schemas/mathml2/content/functions.xsd +73 -0
  303. data/schemas/mathml2/content/linear-algebra.xsd +173 -0
  304. data/schemas/mathml2/content/logic.xsd +53 -0
  305. data/schemas/mathml2/content/relations.xsd +55 -0
  306. data/schemas/mathml2/content/semantics.xsd +85 -0
  307. data/schemas/mathml2/content/sets.xsd +236 -0
  308. data/schemas/mathml2/content/statistics.xsd +136 -0
  309. data/schemas/mathml2/content/tokens.xsd +120 -0
  310. data/schemas/mathml2/content/tokens.xsd.~1.3.~ +119 -0
  311. data/schemas/mathml2/content/vector-calculus.xsd +88 -0
  312. data/schemas/mathml2/mathml2.xsd +59 -0
  313. data/schemas/mathml2/presentation/action.xsd +44 -0
  314. data/schemas/mathml2/presentation/characters.xsd +37 -0
  315. data/schemas/mathml2/presentation/common-attribs.xsd +113 -0
  316. data/schemas/mathml2/presentation/common-types.xsd +103 -0
  317. data/schemas/mathml2/presentation/error.xsd +40 -0
  318. data/schemas/mathml2/presentation/layout.xsd +195 -0
  319. data/schemas/mathml2/presentation/scripts.xsd +186 -0
  320. data/schemas/mathml2/presentation/space.xsd +52 -0
  321. data/schemas/mathml2/presentation/style.xsd +69 -0
  322. data/schemas/mathml2/presentation/table.xsd +216 -0
  323. data/schemas/mathml2/presentation/tokens.xsd +124 -0
  324. data/schemas/mathml3/mathml3-common.xsd +99 -0
  325. data/schemas/mathml3/mathml3-content.xsd +684 -0
  326. data/schemas/mathml3/mathml3-presentation.xsd +2151 -0
  327. data/schemas/mathml3/mathml3-strict-content.xsd +186 -0
  328. data/schemas/mathml3/mathml3.xsd +9 -0
  329. data/schemas/mathml4/mathml4-content.rnc +382 -0
  330. data/schemas/mathml4/mathml4-core.rnc +361 -0
  331. data/schemas/mathml4/mathml4-presentation.rnc +358 -0
  332. data/schemas/mathml4/mathml4-strict-content.rnc +86 -0
  333. data/schemas/mathml4/mathml4.rnc +21 -0
  334. data/schemas/mathml4/mathml4.rnc.1 +21 -0
  335. data/schemas/mathml4/mathml4.rng +37 -0
  336. metadata +249 -2
@@ -0,0 +1,877 @@
1
+ <div1 id="cmvg" role="appendixb"><head>Content Markup Validation Grammar</head>
2
+ <!-- $Id: validation-grammar.xml,v 1.42 2003/09/28 21:24:36 jsdevitt Exp $ -->
3
+
4
+
5
+ <p diff="chg">This presents an informal EBNF grammar that can be used to validate the structure of Content Markup.</p>
6
+
7
+
8
+ <slist diff="chg">
9
+ <sitem>It defines the valid expression trees in content markup.
10
+ It does not define the rules for attribute validation. That must be done separately.</sitem>
11
+
12
+ <sitem>The non-terminal <nt def="Presentation.tags">Presentation_tags</nt> is a placeholder for a valid
13
+ presentation element start tag or end tag.</sitem>
14
+
15
+ <sitem>The string <code>#PCDATA</code> denotes XML parsed character data.</sitem>
16
+
17
+ <sitem>Symbols beginning with '_' (for example <nt def="nt.mmlarg">_mmlarg</nt>) are internal symbols.
18
+ A recursive grammar is usually required for their recognition.</sitem>
19
+
20
+ <sitem>Symbols which are all in lowercase symbols (for example 'ci') are terminal symbols
21
+ representing MathML content elements.</sitem>
22
+
23
+ <sitem>Symbols beginning with Uppercase letters are terminals representating other tokens.</sitem>
24
+
25
+ <!--
26
+ <sitem> revised sb 3.nov.97, 16.nov.97 and 22.dec.1997</sitem>
27
+ <sitem> revised sb 6.jan.98, 6.Feb.1998 and 4.april.1998</sitem>
28
+ <sitem> revised sb 27.nov.2000 for MathML2.0</sitem>
29
+ <sitem> revised dpc for MathML2.0 Second Edition</sitem>
30
+ -->
31
+ </slist>
32
+
33
+ <scrap>
34
+ <head>whitespace definitions including Presentation_tags</head>
35
+
36
+ <prod id="Presentation.tags">
37
+ <lhs>Presentation_tags</lhs>
38
+ <rhs> "presentation"</rhs>
39
+ <com>placeholder</com>
40
+ </prod>
41
+
42
+ <prod id="pSpace">
43
+ <lhs>Space</lhs>
44
+ <rhs> #x09 | #x0A | #x0D | #x20</rhs>
45
+ <com>tab, lf, cr, space characters</com>
46
+ </prod>
47
+
48
+ <prod id="pS">
49
+ <lhs>S</lhs>
50
+ <rhs> (<nt def="pSpace">Space</nt> | <nt def="Presentation.tags">Presentation_tags"</nt>)*</rhs>
51
+ <com>treat presentation as space</com>
52
+ </prod>
53
+ </scrap>
54
+
55
+ <scrap>
56
+ <head>Characters, only for content validation characters</head>
57
+
58
+ <prod id="pChar">
59
+ <lhs>Char</lhs>
60
+ <rhs diff="chg">#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]</rhs>
61
+ <com>valid XML chars</com>
62
+ </prod>
63
+ </scrap>
64
+
65
+
66
+ <slist>
67
+ <sitem>start(\%x) returns a valid start tag for the element \%x</sitem>
68
+ <sitem>end(\%x) returns a valid end tag for the element \%x</sitem>
69
+ <sitem>empty(\%x) returns a valid empty tag for the element \%x</sitem>
70
+ </slist>
71
+
72
+ <eg>
73
+ start(ci) ::= "&lt;ci>"
74
+ end(cn) ::= "&lt;/cn>"
75
+ empty(plus) ::= "&lt;plus/>"
76
+ </eg>
77
+
78
+ <p>The reason for doing this is to avoid writing a grammar
79
+ for all the attributes. The model below is not complete
80
+ for all possible attribute values.</p>
81
+
82
+
83
+ <scrap>
84
+ <head>start and end tag functions</head>
85
+
86
+ <prod id="nt.start">
87
+ <lhs>_start(\%x)</lhs>
88
+ <rhs> "&lt;\%x" (<nt def="pChar">Char</nt> - '>')* ">"</rhs>
89
+ <com> returns a valid start tag for the element \%x</com>
90
+ </prod>
91
+
92
+ <prod id="nt.end">
93
+ <lhs>_end(\%x)</lhs>
94
+ <rhs> "&lt;\%x" <nt def="pSpace">Space</nt>* ">"</rhs>
95
+ <com> returns a valid end tag for the element \%x</com>
96
+ </prod>
97
+
98
+ <prod id="nt.empty">
99
+ <lhs>_empty(\%x)</lhs>
100
+ <rhs> "&lt;\%x" (<nt def="pChar">Char</nt> - '>')* "/>"</rhs>
101
+ <com> returns a valid empty tag for the element \%x</com>
102
+ </prod>
103
+
104
+ <prod id="nt.sg">
105
+ <lhs>_sg(\%x)</lhs>
106
+ <rhs> <nt def="pS">S</nt> <nt def="nt.start">_start</nt>(\%x)</rhs>
107
+ <com> start tag preceded by optional whitespace</com>
108
+ </prod>
109
+
110
+ <prod id="nt.eg">
111
+ <lhs>_eg(\%x)</lhs>
112
+ <rhs> <nt def="nt.end">_end</nt>(\%x) <nt def="pS">S</nt></rhs>
113
+ <com> end tag followed by optional whitespace</com>
114
+ </prod>
115
+
116
+ <prod id="nt.ey">
117
+ <lhs>_ey(\%x)</lhs>
118
+ <rhs> <nt def="pS">S</nt> <nt def="nt.empty">_empty</nt>(\%x) <nt def="pS">S</nt></rhs>
119
+ <com> empty tag preceded and followed by optional whitespace</com>
120
+ </prod>
121
+ </scrap>
122
+
123
+ <scrap diff="add">
124
+ <head>semantics, annotation, etc.</head>
125
+
126
+ <prod id="psemantics">
127
+ <lhs>semantics</lhs>
128
+ <rhs diff="del">
129
+ <nt def="nt.sg">_sg</nt>(semantics)
130
+ <nt def="nt.mmlarg">_mmlarg</nt>
131
+ <nt def="nt.annot">_annot</nt>*
132
+ <nt def="nt.eg">_eg</nt>(semantics)
133
+ </rhs>
134
+ <rhs diff="add">
135
+ <nt def="nt.sg">_sg</nt>(semantics)
136
+ <nt def="nt.mmlarg">_mmlarg</nt>
137
+ <nt def="nt.annot">_annot</nt>*
138
+ <nt def="nt.eg">_eg</nt>(semantics)
139
+ </rhs>
140
+ </prod>
141
+
142
+ <prod id="pannotation">
143
+ <lhs>annotation</lhs>
144
+ <rhs>
145
+ <nt def="nt.sg">_sg</nt>(annotation)
146
+ #PCDATA
147
+ <nt def="nt.eg">_eg</nt>(annotation)
148
+ </rhs>
149
+ </prod>
150
+
151
+ <prod id="pannotation-xml">
152
+ <lhs>annotation-xml</lhs>
153
+ <rhs>
154
+ <nt def="nt.sg">_sg</nt>(annotation-xml)
155
+ <nt def="nt.ANY">_ANY</nt>
156
+ <nt def="nt.eg">_eg</nt>(annotation-xml)
157
+ </rhs>
158
+ </prod>
159
+
160
+ <prod id="nt.ANY">
161
+ <lhs>_ANY</lhs>
162
+ <rhs>"AnyXML"</rhs>
163
+ <com>placeholder for wellformed XML Fragment (not Mixed Content)</com>
164
+ </prod>
165
+
166
+ <prod id="nt.annot">
167
+ <lhs>_annot</lhs>
168
+ <rhs> annotation | annotation-xml </rhs>
169
+ </prod>
170
+ </scrap>
171
+
172
+
173
+
174
+ <scrap>
175
+ <head>mathml content constructs</head>
176
+
177
+ <prod id="nt.mmlall" diff="del">
178
+ <lhs>_mmlall</lhs>
179
+ <rhs> <nt def="nt.container">_container</nt>
180
+ | <nt def="nt.relation">_relation</nt>
181
+ | <nt def="nt.operator">_operator</nt>
182
+ | <nt def="nt.qualifier">_qualifier</nt>
183
+ | <nt def="nt.other">_other</nt>
184
+ </rhs>
185
+ </prod>
186
+
187
+ <prod id="nt.mmlarg">
188
+ <lhs>_mmlarg</lhs>
189
+ <rhs diff="del"> <nt def="nt.container">_container</nt> </rhs>
190
+ <rhs diff="add"> <nt def="nt.container">_container</nt> | <nt def="nt.token">_token</nt> | <nt def="nt.operator">_operator</nt> | <nt def="nt.relation">_relation</nt> </rhs>
191
+ </prod>
192
+
193
+ <prod id="nt.container">
194
+ <lhs>_container</lhs>
195
+ <rhs diff="del"> <nt def="nt.token">_token</nt> | <nt def="nt.special">_special</nt> | <nt def="nt.constructor">_constructor</nt></rhs>
196
+ <rhs diff="add"> <nt def="nt.special">_special</nt> | <nt def="nt.constructor">_constructor</nt></rhs>
197
+ </prod>
198
+
199
+ <prod id="nt.token">
200
+ <lhs>_token</lhs>
201
+ <rhs> ci | cn | csymbol | <nt def="nt.constantsym">_constantsym</nt></rhs>
202
+ </prod>
203
+
204
+ <prod id="nt.special">
205
+ <lhs>_special</lhs>
206
+ <rhs> apply | lambda | reln | fn | semantics</rhs>
207
+ </prod>
208
+
209
+ <prod id="nt.constructor">
210
+ <lhs>_constructor</lhs>
211
+ <rhs> interval | list | matrix | matrixrow | set | vector | piecewise
212
+ | piece | otherwise</rhs>
213
+ </prod>
214
+
215
+ <prod id="nt.other" diff="del">
216
+ <lhs>_other</lhs>
217
+ <rhs diff="del"> condition | declare | sep</rhs>
218
+ </prod>
219
+
220
+ <prod id="nt.qualifier">
221
+ <lhs>_qualifier</lhs>
222
+ <rhs diff="del"> lowlimit | uplimit | bvar | degree | logbase | domainofapplication
223
+ | momentabout</rhs>
224
+ <rhs diff="add"> lowlimit | uplimit | degree | logbase | domainofapplication
225
+ | momentabout | condition </rhs><com diff="add">interval is both a qualifier and a constructor</com>
226
+ </prod>
227
+
228
+ <prod id="nt.constantsym">
229
+ <lhs>_constantsym</lhs>
230
+ <rhs> integers | rationals | reals | naturalnumbers | complexes | primes
231
+ | exponentiale | imaginaryi | notanumber | true | false | pi
232
+ | eulergamma | infinity</rhs>
233
+ </prod>
234
+ </scrap>
235
+
236
+ <scrap>
237
+ <head> relations</head>
238
+
239
+ <prod id="nt.relation">
240
+ <lhs>_relation</lhs>
241
+ <rhs> <nt def="nt.genrel">_genrel</nt> | <nt def="nt.setrel">_setrel</nt> | <nt def="nt.seqrel2ary">_seqrel2ary</nt></rhs>
242
+ </prod>
243
+
244
+ <prod id="nt.genrel">
245
+ <lhs>_genrel</lhs>
246
+ <rhs> <nt def="nt.genrel2ary">_genrel2ary</nt> | <nt def="nt.genrelnary">_genrelnary</nt></rhs>
247
+ </prod>
248
+
249
+ <prod id="nt.genrel2ary">
250
+ <lhs>_genrel2ary</lhs>
251
+ <rhs> ne</rhs>
252
+ </prod>
253
+
254
+ <prod id="nt.genrelnary">
255
+ <lhs>_genrelnary</lhs>
256
+ <rhs> eq | leq | lt | geq | gt</rhs>
257
+ </prod>
258
+
259
+ <prod id="nt.setrel">
260
+ <lhs>_setrel</lhs>
261
+ <rhs> <nt def="nt.seqrel2ary">_seqrel2ary</nt> | <nt def="nt.setrelnary">_setrelnary</nt></rhs>
262
+ </prod>
263
+
264
+ <prod id="nt.setrel2ary">
265
+ <lhs>_setrel2ary</lhs>
266
+ <rhs> in | notin | notsubset | notprsubset</rhs>
267
+ </prod>
268
+
269
+ <prod id="nt.setrelnary">
270
+ <lhs>_setrelnary</lhs>
271
+ <rhs> subset | prsubset</rhs>
272
+ </prod>
273
+
274
+ <prod id="nt.seqrel2ary">
275
+ <lhs>_seqrel2ary</lhs>
276
+ <rhs> tendsto</rhs>
277
+ </prod>
278
+ </scrap>
279
+
280
+ <scrap>
281
+ <head>operators</head>
282
+
283
+ <prod id="nt.operator">
284
+ <lhs>_operator</lhs>
285
+ <rhs diff="chg"> <nt def="nt.funcop">_funcop</nt> |
286
+ <nt def="nt.arithop">_arithop</nt> | <nt def="nt.calcop">_calcop</nt> |
287
+ <nt def="nt.vcalcop">_vcalcop</nt> | <nt def="nt.seqop">_seqop</nt> |
288
+ <nt def="nt.trigop">_trigop</nt> | <nt def="nt.classop">_classop</nt> |
289
+ <nt def="nt.statop">_statop</nt> | <nt def="nt.lalgop">_lalgop</nt> |
290
+ <nt def="nt.logicop">_logicop</nt> | <nt def="nt.setop">_setop</nt></rhs>
291
+ </prod>
292
+ </scrap>
293
+
294
+ <scrap>
295
+ <head>functional operators</head>
296
+
297
+ <prod id="nt.funcop">
298
+ <lhs>_funcop</lhs>
299
+ <rhs> <nt def="nt.funcop1ary">_funcop1ary</nt> | <nt def="nt.funcopnary">_funcopnary</nt></rhs>
300
+ </prod>
301
+
302
+ <prod id="nt.funcop1ary">
303
+ <lhs>_funcop1ary</lhs>
304
+ <rhs> inverse | ident | domain | codomain | image</rhs>
305
+ </prod>
306
+
307
+ <prod id="nt.funcopnary">
308
+ <lhs>_funcopnary</lhs>
309
+ <rhs> fn| compose</rhs>
310
+ <com> general user-defined function is n-ary</com>
311
+ </prod>
312
+ </scrap>
313
+
314
+ <p>(note <el>minus</el> is both 1ary and 2ary)</p>
315
+
316
+ <scrap>
317
+ <head> arithmetic operators</head>
318
+
319
+ <prod id="nt.arithop">
320
+ <lhs>_arithop</lhs>
321
+ <rhs> <nt def="nt.arithop1ary">_arithop1ary</nt> | <nt def="nt.arithop2ary">_arithop2ary</nt> | <nt def="nt.arithopnary">_arithopnary</nt> | root</rhs>
322
+ </prod>
323
+
324
+ <prod id="nt.arithop1ary">
325
+ <lhs>_arithop1ary</lhs>
326
+ <rhs> abs | conjugate | factorial | minus | arg | real | imaginary
327
+ | floor | ceiling</rhs>
328
+ </prod>
329
+
330
+ <prod id="nt.arithop2ary">
331
+ <lhs>_arithop2ary</lhs>
332
+ <rhs> quotient | divide | minus | power | rem</rhs>
333
+ </prod>
334
+
335
+ <prod id="nt.arithopnary">
336
+ <lhs>_arithopnary</lhs>
337
+ <rhs> plus | times | max | min | gcd | lcm</rhs>
338
+ </prod>
339
+ </scrap>
340
+
341
+ <scrap>
342
+ <head> calculus and vector calculus</head>
343
+
344
+ <prod id="nt.calcop">
345
+ <lhs>_calcop</lhs>
346
+ <rhs> int | diff | partialdiff</rhs>
347
+ </prod>
348
+
349
+ <prod id="nt.vcalcop">
350
+ <lhs>_vcalcop</lhs>
351
+ <rhs> divergence | grad | curl | laplacian</rhs>
352
+ </prod>
353
+ </scrap>
354
+
355
+ <scrap>
356
+ <head> sequences and series</head>
357
+
358
+ <prod id="nt.seqop">
359
+ <lhs>_seqop</lhs>
360
+ <rhs> sum | product | limit</rhs>
361
+ </prod>
362
+ </scrap>
363
+
364
+ <scrap>
365
+ <head> elementary classical functions and trigonometry</head>
366
+
367
+ <prod id="nt.classop">
368
+ <lhs>_classop</lhs>
369
+ <rhs> exp | ln | log</rhs>
370
+ </prod>
371
+ <prod id="nt.trigop">
372
+ <lhs>_trigop</lhs>
373
+ <rhs> sin | cos | tan | sec | csc | cot | sinh
374
+ | cosh | tanh | sech | csch | coth
375
+ | arcsin | arccos | arctan</rhs>
376
+ </prod>
377
+ </scrap>
378
+
379
+ <scrap>
380
+ <head> statistics operators</head>
381
+
382
+ <prod id="nt.statop">
383
+ <lhs>_statop</lhs>
384
+ <rhs> <nt def="nt.statopnary">_statopnary</nt> | moment</rhs>
385
+ </prod>
386
+
387
+ <prod id="nt.statopnary">
388
+ <lhs>_statopnary</lhs>
389
+ <rhs> mean | sdev | variance | median | mode</rhs>
390
+ </prod>
391
+ </scrap>
392
+
393
+ <scrap>
394
+ <head> linear algebra operators</head>
395
+
396
+ <prod id="nt.lalgop">
397
+ <lhs>_lalgop</lhs>
398
+ <rhs> <nt def="nt.lalgop1ary">_lalgop1ary</nt> |<nt def="nt.lalgop2ary">_lalgop2ary</nt> | <nt def="nt.lalgopnary">_lalgopnary</nt></rhs>
399
+ </prod>
400
+
401
+ <prod id="nt.lalgop1ary">
402
+ <lhs>_lalgop1ary</lhs>
403
+ <rhs> determinant | transpose</rhs>
404
+ </prod>
405
+
406
+ <prod id="nt.lalgop2ary">
407
+ <lhs>_lalgop2ary</lhs>
408
+ <rhs> vectorproduct | scalarproduct | outerproduct</rhs>
409
+ </prod>
410
+
411
+ <prod id="nt.lalgopnary">
412
+ <lhs>_lalgopnary</lhs>
413
+ <rhs> selector</rhs>
414
+ </prod>
415
+ </scrap>
416
+
417
+ <scrap>
418
+ <head> logical operators</head>
419
+
420
+ <prod id="nt.logicop">
421
+ <lhs>_logicop</lhs>
422
+ <rhs> <nt def="nt.logicop1ary">_logicop1ary</nt>
423
+ | <nt def="nt.logicopnary">_logicopnary</nt>
424
+ | <nt def="nt.logicop2ary">_logicop2ary</nt>
425
+ | <nt def="nt.logicopquant">_logicopquant</nt>
426
+ </rhs>
427
+ </prod>
428
+
429
+ <prod id="nt.logicop1ary">
430
+ <lhs>_logicop1ary</lhs>
431
+ <rhs> not</rhs>
432
+ </prod>
433
+
434
+ <prod id="nt.logicop2ary">
435
+ <lhs>_logicop2ary</lhs>
436
+ <rhs> implies | equivalent | approx | factorof</rhs>
437
+ </prod>
438
+
439
+ <prod id="nt.logicopnary">
440
+ <lhs>_logicopnary</lhs>
441
+ <rhs> and | or | xor</rhs>
442
+ </prod>
443
+
444
+ <prod id="nt.logicopquant">
445
+ <lhs>_logicopquant</lhs>
446
+ <rhs> forall | exists</rhs>
447
+ </prod>
448
+ </scrap>
449
+
450
+ <scrap>
451
+ <head> set theoretic operators</head>
452
+
453
+ <prod id="nt.setop">
454
+ <lhs>_setop</lhs>
455
+ <rhs> <nt def="nt.setop1ary">_setop1ary</nt> |<nt def="nt.setop2ary">_setop2ary</nt> | <nt def="nt.setopnary">_setopnary</nt></rhs>
456
+ </prod>
457
+
458
+ <prod id="nt.setop1ary">
459
+ <lhs>_setop1ary</lhs>
460
+ <rhs> card</rhs>
461
+ </prod>
462
+
463
+ <prod id="nt.setop2ary">
464
+ <lhs>_setop2ary</lhs>
465
+ <rhs> setdiff</rhs>
466
+ </prod>
467
+
468
+ <prod id="nt.setopnary">
469
+ <lhs>_setopnary</lhs>
470
+ <rhs> union | intersect | cartesianproduct</rhs>
471
+ </prod>
472
+ </scrap>
473
+
474
+ <scrap>
475
+ <head> operator groups</head>
476
+ <prod id="nt.unaryop">
477
+ <lhs>_unaryop</lhs>
478
+ <rhs diff="chg"> <nt def="nt.funcop1ary">_funcop1ary</nt>
479
+ | <nt def="nt.arithop1ary">_arithop1ary</nt>
480
+ | <nt def="nt.trigop">_trigop</nt>
481
+ | <nt def="nt.classop">_classop</nt>
482
+ | <nt def="nt.calcop">_calcop</nt>
483
+ | <nt def="nt.vcalcop">_vcalcop</nt>
484
+ | <nt def="nt.logicop1ary">_logicop1ary</nt>
485
+ | <nt def="nt.lalgop1ary">_lalgop1ary</nt>
486
+ | <nt def="nt.setop1ary">_setop1ary</nt>
487
+ </rhs>
488
+ </prod>
489
+
490
+ <prod id="nt.binaryop">
491
+ <lhs>_binaryop</lhs>
492
+ <rhs> <nt def="nt.arithop2ary">_arithop2ary</nt> | <nt def="nt.setop2ary">_setop2ary</nt> | <nt def="nt.logicop2ary">_logicop2ary</nt> | <nt def="nt.lalgop2ary">_lalgop2ary</nt></rhs>
493
+ </prod>
494
+
495
+ <prod id="nt.naryop">
496
+ <lhs>_naryop</lhs>
497
+ <rhs> <nt def="nt.arithopnary">_arithopnary</nt> | <nt def="nt.statopnary">_statopnary</nt> | <nt def="nt.logicopnary">_logicopnary</nt>
498
+ | <nt def="nt.lalgopnary">_lalgopnary</nt> | <nt def="nt.setopnary">_setopnary</nt> | <nt def="nt.funcopnary">_funcopnary</nt></rhs>
499
+ </prod>
500
+
501
+ <prod id="nt.specialop" diff="add">
502
+ <lhs>_specialop</lhs>
503
+ <rhs> <nt def="nt.special">_special</nt> | ci | csymbol </rhs>
504
+ </prod>
505
+
506
+ <prod id="nt.ispop">
507
+ <lhs>_ispop</lhs>
508
+ <rhs> int | sum | product</rhs>
509
+ </prod>
510
+
511
+ <prod id="nt.diffop">
512
+ <lhs>_diffop</lhs>
513
+ <rhs> diff | partialdiff</rhs>
514
+ </prod>
515
+
516
+ <prod id="nt.binaryrel">
517
+ <lhs>_binaryrel</lhs>
518
+ <rhs> <nt def="nt.genrel2ary">_genrel2ary</nt> | <nt def="nt.setrel2ary">_setrel2ary</nt> | <nt def="nt.seqrel2ary">_seqrel2ary</nt></rhs>
519
+ </prod>
520
+
521
+ <prod id="nt.naryrel">
522
+ <lhs>_naryrel</lhs>
523
+ <rhs> <nt def="nt.genrelnary">_genrelnary</nt> | <nt def="nt.setrelnary">_setrelnary</nt></rhs>
524
+ </prod>
525
+ </scrap>
526
+
527
+ <scrap>
528
+ <head>separator</head>
529
+
530
+ <prod id="psep">
531
+ <lhs>sep</lhs>
532
+ <rhs> <nt def="nt.ey">_ey</nt>(sep)</rhs>
533
+ </prod>
534
+ </scrap>
535
+
536
+
537
+ <scrap>
538
+ <head>leaf tokens and data content of leaf elements</head>
539
+
540
+ <prod id="nt.mdatai">
541
+ <lhs>_mdatai</lhs>
542
+ <rhs> (#PCDATA | <nt def="Presentation.tags">Presentation_tags</nt>)*</rhs>
543
+ <com>note _mdata includes Presentation constructs here.</com>
544
+ </prod>
545
+
546
+ <prod id="nt.mdatan">
547
+ <lhs>_mdatan</lhs>
548
+ <rhs> (#PCDATA | sep | <nt def="Presentation.tags">Presentation_tags</nt>)*</rhs>
549
+ <com>note _mdata includes Presentation constructs here.</com>
550
+ </prod>
551
+
552
+ <prod id="pci">
553
+ <lhs>ci</lhs>
554
+ <rhs> <nt def="nt.sg">_sg</nt>(ci) <nt def="nt.mdatai">_mdatai</nt> <nt def="nt.eg">_eg</nt>(ci)</rhs>
555
+ </prod>
556
+
557
+ <prod id="pcn">
558
+ <lhs>cn</lhs>
559
+ <rhs> <nt def="nt.sg">_sg</nt>(cn) <nt def="nt.mdatan">_mdatan</nt> <nt def="nt.eg">_eg</nt>(cn)</rhs>
560
+ </prod>
561
+
562
+ <prod id="pcsymbol">
563
+ <lhs>csymbol</lhs>
564
+ <rhs> <nt def="nt.sg">_sg</nt>(csymbol) <nt def="nt.mdatai">_mdatai</nt> <nt def="nt.eg">_eg</nt>(csymbol)</rhs>
565
+ </prod>
566
+ </scrap>
567
+
568
+ <p>
569
+ <el>condition</el> - constraints.
570
+ constraints contains either a single <el>reln</el> (relation), or
571
+ an apply holding a logical combination of relations, or
572
+ a set (over which the operator should be applied).</p>
573
+ <scrap>
574
+ <head>condition</head>
575
+
576
+ <prod id="pcondition">
577
+ <lhs>condition</lhs>
578
+ <rhs> <nt def="nt.sg">_sg</nt>(condition) reln | apply | set <nt def="nt.eg">_eg</nt>(condition)</rhs>
579
+ </prod>
580
+ </scrap>
581
+
582
+ <scrap>
583
+ <head> domains for integral, sum , product, and specials</head>
584
+
585
+ <prod id="nt.ispdomain" diff="del">
586
+ <lhs>_ispdomain</lhs>
587
+ <rhs> (lowlimit uplimit?)
588
+ | uplimit
589
+ | interval
590
+ | condition</rhs>
591
+ </prod>
592
+
593
+ <prod id="nt.domainofapp" diff="add">
594
+ <lhs>_domainofapp</lhs>
595
+ <rhs> domainofapplication | <nt def="nt.domainabbrev">_domainabbrev</nt></rhs>
596
+ </prod>
597
+
598
+ <prod id="nt.domainabbrev" diff="add">
599
+ <lhs>_domainabbrev</lhs>
600
+ <rhs> (lowlimit uplimit?)
601
+ | uplimit
602
+ | interval
603
+ | condition</rhs>
604
+ </prod>
605
+ </scrap>
606
+
607
+ <p>
608
+ Note that <el>apply</el> is used in place of the deprecated <el>reln</el> in MathML2.0
609
+ for relational operators as well as arithmetic, algebraic etc.</p>
610
+
611
+ <scrap>
612
+ <head>apply construct</head>
613
+
614
+ <prod id="papply">
615
+ <lhs>apply</lhs>
616
+ <rhs> <nt def="nt.sg">_sg</nt>(apply) <nt def="nt.applybody">_applybody</nt> | <nt def="nt.relnbody">_relnbody</nt> <nt def="nt.eg">_eg</nt>(apply)</rhs>
617
+ </prod>
618
+
619
+ <prod id="nt.applybody">
620
+ <lhs>_applybody</lhs>
621
+ <rhs>( <nt def="nt.unaryop">_unaryop</nt> <nt def="nt.mmlarg">_mmlarg</nt> )</rhs>
622
+ <com>1-ary ops</com>
623
+ <rhs>| (<nt def="nt.binaryop">_binaryop</nt> <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
624
+ <com>2-ary ops</com>
625
+ <rhs>| (<nt def="nt.naryop">_naryop</nt> <nt def="nt.mmlarg">_mmlarg</nt>*)</rhs>
626
+ <com>n-ary ops, enumerated arguments</com>
627
+ <rhs diff="del">| (<nt def="nt.naryop">_naryop</nt> bvar* condition <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
628
+ <com diff="del">n-ary ops, condition defines argument list</com>
629
+ <rhs diff="add">| (<nt def="nt.naryop">_naryop</nt> bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
630
+ <com>n-ary ops, over domain of application</com>
631
+ <rhs diff="add">| (<nt def="nt.specialop">_specialop</nt> <nt def="nt.mmlarg">_mmlarg</nt>*)</rhs>
632
+ <com>special ops can be applied to anything</com>
633
+ <rhs diff="add">| (<nt def="nt.specialop">_specialop</nt> bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
634
+ <com>special ops, over domain of application </com>
635
+ <rhs diff="del">| (<nt def="nt.ispop">_ispop</nt> bvar? <nt def="nt.ispdomain">_ispdomain</nt>? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
636
+ <com diff="del">integral, sum, product</com>
637
+ <rhs diff="del">| (<nt def="nt.ispop">_ispop</nt> domainofapplication? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
638
+ <com diff="del">integral, sum, product</com>
639
+ <rhs diff="add">| (<nt def="nt.ispop">_ispop</nt> bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
640
+ <com>integral, sum, product</com>
641
+ <rhs>| (<nt def="nt.diffop">_diffop</nt> bvar* <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
642
+ <com>differential ops</com>
643
+ <rhs>| (log logbase? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
644
+ <com>logs</com>
645
+ <rhs>| (moment degree? momentabout? <nt def="nt.mmlarg">_mmlarg</nt>*)</rhs>
646
+ <com>statistical moment</com>
647
+ <rhs>| (root degree? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
648
+ <com>radicals - default is square-root</com>
649
+ <rhs>| (limit bvar* lowlimit? condition? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
650
+ <com>limits</com>
651
+ <rhs diff="del">| (<nt def="nt.logicopquant">_logicopquant</nt> bvar+ condition? (reln | apply) )</rhs>
652
+ <com diff="del">quantifier with explicit bound variables</com>
653
+ <rhs diff="add">| (<nt def="nt.logicopquant">_logicopquant</nt> bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt>)</rhs>
654
+ <com diff="add">quantifier with explicit bound variables</com>
655
+ </prod>
656
+ </scrap>
657
+
658
+ <p diff="chg">
659
+ Equations and relations - <el>reln</el> uses lisp-like syntax (like <el>apply</el>)
660
+ the <el>bvar</el> and <el>condition</el> elements are used to construct a "such that" or
661
+ "where" constraint on the relation.
662
+ Note that <el>reln</el> is deprecated but still valid in MathML2.0.</p>
663
+
664
+ <scrap>
665
+ <head>equations and relations</head>
666
+
667
+ <prod id="preln">
668
+ <lhs>reln</lhs>
669
+ <rhs> <nt def="nt.sg">_sg</nt>(reln) <nt def="nt.relnbody">_relnbody</nt> <nt def="nt.eg">_eg</nt>(reln)</rhs>
670
+ </prod>
671
+
672
+ <prod id="nt.relnbody">
673
+ <lhs>_relnbody</lhs>
674
+ <rhs> ( <nt def="nt.binaryrel">_binaryrel</nt> bvar* condition? <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.mmlarg">_mmlarg</nt> )
675
+ | ( <nt def="nt.naryrel">_naryrel</nt> bvar* condition? <nt def="nt.mmlarg">_mmlarg</nt>* )</rhs>
676
+ </prod>
677
+ </scrap>
678
+
679
+ <scrap>
680
+ <head> fn construct Note that fn is deprecated but still valid in MathML2.0</head>
681
+
682
+ <prod id="pfn">
683
+ <lhs>fn</lhs>
684
+ <rhs> <nt def="nt.sg">_sg</nt>(fn) <nt def="nt.fnbody">_fnbody</nt> <nt def="nt.eg">_eg</nt>(fn)</rhs>
685
+ </prod>
686
+
687
+ <prod id="nt.fnbody">
688
+ <lhs>_fnbody</lhs>
689
+ <rhs diff="del"> <nt def="Presentation.tags">Presentation_tags</nt> | <nt def="nt.container">_container</nt></rhs>
690
+ <rhs diff="add"> <nt def="Presentation.tags">Presentation_tags</nt> | <nt def="nt.mmlarg">_mmlarg</nt></rhs>
691
+ </prod>
692
+ </scrap>
693
+
694
+ <scrap>
695
+ <head> <el>lambda</el> construct <phrase diff="del">- note at least 1 bvar must be present</phrase></head>
696
+
697
+ <prod id="plambda">
698
+ <lhs>lambda</lhs>
699
+ <rhs> <nt def="nt.sg">_sg</nt>(lambda) <nt def="nt.lambdabody">_lambdabody</nt> <nt def="nt.eg">_eg</nt>(lambda)</rhs>
700
+ </prod>
701
+
702
+ <prod id="nt.lambdabody">
703
+ <lhs>_lambdabody</lhs>
704
+ <rhs diff="del"> bvar+ <nt def="nt.container">_container</nt></rhs>
705
+ <rhs diff="add"> bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt></rhs>
706
+ <com>multivariate lambda calculus</com>
707
+ </prod>
708
+ </scrap>
709
+
710
+ <scrap>
711
+ <head><el>declare</el> construct</head>
712
+
713
+ <prod id="pdeclare">
714
+ <lhs>declare</lhs>
715
+ <rhs> <nt def="nt.sg">_sg</nt>(declare) <nt def="nt.declarebody">_declarebody</nt> <nt def="nt.eg">_eg</nt>(declare)</rhs>
716
+ </prod>
717
+
718
+ <prod id="nt.declarebody">
719
+ <lhs>_declarebody</lhs>
720
+ <rhs> ci (fn | constructor)?</rhs>
721
+ </prod>
722
+ </scrap>
723
+
724
+ <scrap>
725
+ <head> constructors</head>
726
+
727
+ <prod id="pinterval">
728
+ <lhs>interval</lhs>
729
+ <rhs> <nt def="nt.sg">_sg</nt>(interval) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(interval)</rhs>
730
+ <com>start, end define interval</com>
731
+ </prod>
732
+
733
+ <prod id="pset">
734
+ <lhs>set</lhs>
735
+ <rhs> <nt def="nt.sg">_sg</nt>(set) <nt def="nt.lsbody">_lsbody</nt> <nt def="nt.eg">_eg</nt>(set)</rhs>
736
+ </prod>
737
+
738
+ <prod id="plist">
739
+ <lhs>list</lhs>
740
+ <rhs> <nt def="nt.sg">_sg</nt>(list) <nt def="nt.lsbody">_lsbody</nt> <nt def="nt.eg">_eg</nt>(list)</rhs>
741
+ </prod>
742
+
743
+ <prod id="nt.lsbody">
744
+ <lhs>_lsbody</lhs>
745
+ <rhs> <nt def="nt.mmlarg">_mmlarg</nt>*</rhs><com diff="chg">enumerated arguments</com>
746
+ <rhs diff="del">| (bvar* condition <nt def="nt.mmlarg">_mmlarg</nt>)</rhs><com diff="del">enumerated arguments</com>
747
+ <rhs diff="add">| (bvar* <nt def="nt.domainofapp">_domainofapp</nt> <nt def="nt.mmlarg">_mmlarg</nt>)</rhs><com diff="add">generated arguments</com>
748
+ </prod>
749
+
750
+ <prod id="pmatrix">
751
+ <lhs>matrix</lhs>
752
+ <rhs> <nt def="nt.sg">_sg</nt>(matrix) matrixrow* <nt def="nt.eg">_eg</nt>(matrix)</rhs>
753
+ <rhs diff="add">| <nt def="nt.sg">_sg</nt>(matrix) bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(matrix)</rhs>
754
+ <com diff="add">vectors over domain of application</com>
755
+ </prod>
756
+
757
+ <prod id="pmatrixrow">
758
+ <lhs>matrixrow</lhs>
759
+ <rhs> <nt def="nt.sg">_sg</nt>(matrixrow) <nt def="nt.mmlarg">_mmlarg</nt>* <nt def="nt.eg">_eg</nt>(matrixrow)</rhs>
760
+ <com>allows matrix of operators</com>
761
+ </prod>
762
+
763
+ <prod id="pvector">
764
+ <lhs>vector</lhs>
765
+ <rhs> <nt def="nt.sg">_sg</nt>(vector) <nt def="nt.mmlarg">_mmlarg</nt>* <nt def="nt.eg">_eg</nt>(vector)</rhs>
766
+ <rhs diff="add">| <nt def="nt.sg">_sg</nt>(vector) bvar* <nt def="nt.domainofapp">_domainofapp</nt>? <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(vector)</rhs>
767
+ <com diff="add">vectors over domain of application</com>
768
+ </prod>
769
+
770
+ <prod id="ppiecewise">
771
+ <lhs>piecewise</lhs>
772
+ <rhs diff="del"> <nt def="nt.sg">_sg</nt>(piecewise) piece+ otherwise? <nt def="nt.eg">_eg</nt>(piecewise)</rhs>
773
+ <rhs diff="add"> <nt def="nt.sg">_sg</nt>(piecewise) piece* otherwise? <nt def="nt.eg">_eg</nt>(piecewise)</rhs>
774
+ </prod>
775
+
776
+ <prod id="ppiece">
777
+ <lhs>piece</lhs>
778
+ <rhs diff="del"> <nt def="nt.sg">_sg</nt>(piece) <nt def="nt.mmlall">_mmlall</nt> <nt def="nt.mmlall">_mmlall</nt> <nt def="nt.eg">_eg</nt>(piece)</rhs>
779
+ <rhs diff="add"> <nt def="nt.sg">_sg</nt>(piece) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(piece)</rhs>
780
+ <com>used by piecewise</com>
781
+ </prod>
782
+
783
+ <prod id="potherwise">
784
+ <lhs>otherwise</lhs>
785
+ <rhs diff="chg"> <nt def="nt.sg">_sg</nt>(otherwise) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(otherwise)</rhs>
786
+ <com>used by piecewise</com>
787
+ </prod>
788
+ </scrap>
789
+
790
+ <scrap>
791
+ <head>bound variables</head>
792
+
793
+ <prod diff="add" id="nt.cisemantics">
794
+ <lhs>_cisemantics</lhs>
795
+ <rhs>
796
+ <nt def="nt.sg">_sg</nt>(semantics)
797
+ <nt def="nt.citoken">_citoken</nt>
798
+ <nt def="nt.annot">_annot</nt>*
799
+ <nt def="nt.eg">_eg</nt>(semantics)
800
+ </rhs>
801
+ </prod>
802
+
803
+ <prod diff="add" id="nt.citoken">
804
+ <lhs>_citoken</lhs>
805
+ <rhs> ci | <nt def="nt.cisemantics">_cisemantics</nt></rhs>
806
+ </prod>
807
+
808
+ <prod id="pbvar">
809
+ <lhs>bvar</lhs>
810
+ <rhs diff="chg"> <nt def="nt.sg">_sg</nt>(bvar) <nt def="nt.citoken">_citoken</nt> degree? <nt def="nt.eg">_eg</nt>(bvar)</rhs>
811
+ </prod>
812
+
813
+ <prod id="pdegree">
814
+ <lhs>degree</lhs>
815
+ <rhs> <nt def="nt.sg">_sg</nt>(degree) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(degree)</rhs>
816
+ </prod>
817
+ </scrap>
818
+
819
+ <scrap>
820
+ <head>other qualifiers - note the contained <nt def="nt.mmlarg">_mmlarg</nt> could be a <el>reln</el></head>
821
+
822
+ <prod id="plowlimit">
823
+ <lhs>lowlimit</lhs>
824
+ <rhs> <nt def="nt.sg">_sg</nt>(lowlimit) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(lowlimit)</rhs>
825
+ </prod>
826
+
827
+ <prod id="puplimit">
828
+ <lhs>uplimit</lhs>
829
+ <rhs> <nt def="nt.sg">_sg</nt>(uplimit) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(uplimit)</rhs>
830
+ </prod>
831
+
832
+ <prod id="plogbase">
833
+ <lhs>logbase</lhs>
834
+ <rhs> <nt def="nt.sg">_sg</nt>(logbase) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(logbase)</rhs>
835
+ </prod>
836
+
837
+ <prod id="pdomainofapplication">
838
+ <lhs>domainofapplication</lhs>
839
+ <rhs> <nt def="nt.sg">_sg</nt>(domainofapplication) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(domainofapplication)</rhs>
840
+ </prod>
841
+
842
+ <prod id="pmomentabout">
843
+ <lhs>momentabout</lhs>
844
+ <rhs> <nt def="nt.sg">_sg</nt>(momentabout) <nt def="nt.mmlarg">_mmlarg</nt> <nt def="nt.eg">_eg</nt>(momentabout)</rhs>
845
+ </prod>
846
+ </scrap>
847
+
848
+ <scrap diff="del">
849
+ <head>relations and operators and constant symbols
850
+ (one declaration for each operator and relation element)</head>
851
+ <prod id="x.nt.relation">
852
+ <lhs>_relation</lhs>
853
+ <rhs> <nt def="nt.ey">_ey</nt>(\%relation2)</rhs>
854
+ <com>for example &lt;eq/> &lt;lt/></com>
855
+ </prod>
856
+ <prod id="x.nt.operator">
857
+ <lhs>_operator</lhs>
858
+ <rhs> <nt def="nt.ey">_ey</nt>(\%operator)</rhs>
859
+ <com>for example &lt;exp/> &lt;times/></com>
860
+ </prod>
861
+ <prod id="x.nt.const-symbol">
862
+ <lhs>_const-symbol</lhs>
863
+ <rhs> <nt def="nt.ey">_ey</nt>(\%const-symbol)</rhs>
864
+ <com>for example &lt;integers/> &lt;false/></com>
865
+ </prod>
866
+ </scrap>
867
+
868
+ <p>The top level <el>math</el> element. Allow <el>declare</el> only at the head of a <el>math</el> element.</p>
869
+ <scrap>
870
+ <head>math</head>
871
+ <prod id="pmath">
872
+ <lhs>math</lhs>
873
+ <rhs> <nt def="nt.sg">_sg</nt>(math) declare* <nt def="nt.mmlarg">_mmlarg</nt>* <nt def="nt.eg">_eg</nt>(math)</rhs>
874
+ </prod>
875
+ </scrap>
876
+
877
+ </div1>