incubator-odf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From devin...@apache.org
Subject svn commit: r1172466 [8/16] - in /incubator/odf/trunk/validator: ./ misc/ nbproject/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/odftoolkit/ src/main/java/org/odftoolkit/odfvalidator/ src/main/resources/ src/main/resources/META-INF/ s...
Date Mon, 19 Sep 2011 05:43:28 GMT
Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-cds.rng
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-cds.rng?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-cds.rng (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-cds.rng Mon Sep 19 05:43:23 2011
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+      This is the Mathematical Markup Language (MathML) 3.0, an XML
+      application for describing mathematical notation and capturing
+      both its structure and content.
+  
+      Copyright 1998-2007 World Wide Web Consortium
+         (Massachusetts Institute of Technology, Institut National de
+          Recherche en Informatique et en Automatique, Keio University).
+          All Rights Reserved.
+  
+      Permission to use, copy, modify and distribute the RelaxNG schema for MathML3
+      and its accompanying documentation for any purpose and without fee is
+      hereby granted in perpetuity, provided that the above copyright notice
+      and this paragraph appear in all copies.  The copyright holders make
+      no representation about the suitability of the Schema for any purpose.
+  
+      This file contains the grammar driver for CD-based arity checking
+      It is provided "as is" without expressed or implied warranty.
+  
+      Revision:   $Id: mathml3-cds.rng,v 1.1 2007/12/11 15:59:27 dcarlis Exp $
+      Author: Michael Kohlhase http://kwarc.info/kohlhase
+-->
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <!--
+    some elements were containers in MathML2, so they get a separate treatment,
+    that can be extended in mathml3-pragmatic.rnc
+  -->
+  <!-- we augment the content of an apply element -->
+  <define name="apply.content" combine="choice">
+    <choice>
+      <group>
+        <ref name="cd.token.unary.class"/>
+        <ref name="ContExp"/>
+      </group>
+      <group>
+        <ref name="cd.token.binary.class"/>
+        <ref name="ContExp"/>
+        <ref name="ContExp"/>
+      </group>
+      <group>
+        <ref name="cd.token.nary.class"/>
+        <oneOrMore>
+          <ref name="ContExp"/>
+        </oneOrMore>
+      </group>
+      <ref name="cd.container.class"/>
+    </choice>
+  </define>
+  <!-- of the bind element -->
+  <define name="binder.class" combine="choice">
+    <ref name="cd.token.binder.class"/>
+  </define>
+  <!-- now we allow all tokens (except the binding symbols) to appear on their own -->
+  <define name="ContExp" combine="choice">
+    <choice>
+      <ref name="cd.token.unary.class"/>
+      <ref name="cd.token.binary.class"/>
+      <ref name="cd.token.nary.class"/>
+      <ref name="cd.token.class"/>
+    </choice>
+  </define>
+  <!-- now we allow the containers as well. -->
+  <define name="ContExp" combine="choice">
+    <ref name="cd.container.class"/>
+  </define>
+  <!-- we set the default content type for tokens -->
+  <define name="Token.type">
+    <ref name="Definition.attrib"/>
+    <ref name="MathML.Common.attrib"/>
+  </define>
+  <!--
+    also set up MathMLtype, which is used in the CDs 
+    ednote(rnc:mathmltype) fudge it for now
+  -->
+  <define name="MathMLtype">
+    <data type="string"/>
+  </define>
+  <!--
+    simple arity checking for Tokens from the MathML3 CDs. 
+    we set up the categories to be extended by the CD-generated grammars
+  -->
+  <define name="cd.token.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.token.unary.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.token.binary.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.token.nary.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.token.binder.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.token.key.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.token.error.class">
+    <notAllowed/>
+  </define>
+  <define name="cd.container.class">
+    <notAllowed/>
+  </define>
+  <!-- then we include the generated ones -->
+  <include href="algebra-logic.rng"/>
+  <include href="basic-content-elements.rng"/>
+  <include href="calculus_veccalc.rng"/>
+  <include href="constants.rng"/>
+  <include href="errors.rng"/>
+  <include href="linear_algebra.rng"/>
+  <include href="relations.rng"/>
+  <include href="sequences_series.rng"/>
+  <include href="sets.rng"/>
+  <include href="specfun.rng"/>
+  <include href="statistics.rng"/>
+</grammar>

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rnc
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rnc?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rnc (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rnc Mon Sep 19 05:43:23 2011
@@ -0,0 +1,84 @@
+#     This is the Mathematical Markup Language (MathML) 3.0, an XML
+#     application for describing mathematical notation and capturing
+#     both its structure and content.
+#
+#     Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
+# 
+#     Use and distribution of this code are permitted under the terms
+#     W3C Software Notice and License
+#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+
+default namespace m = "http://www.w3.org/1998/Math/MathML"
+namespace local = ""
+
+start = math
+
+math = element math {math.attributes,MathExpression*}
+MathExpression = semantics
+
+NonMathMLAtt = attribute (* - (local:*|m:*)) {xsd:string} 
+
+CommonDeprecatedAtt = attribute other {text}?
+
+CommonAtt = attribute id {xsd:ID}?,
+            attribute xref {text}?,
+            attribute class {xsd:NMTOKENS}?,
+            attribute style {xsd:string}?,
+            attribute href {xsd:anyURI}?,
+            CommonDeprecatedAtt,
+            NonMathMLAtt*
+
+
+math.attributes = CommonAtt,
+               attribute display {"block" | "inline"}?,
+               attribute maxwidth {length}?,
+               attribute overflow {"linebreak" | "scroll" | "elide" | "truncate" | "scale"}?,
+               attribute altimg {xsd:anyURI}?,
+               attribute altimg-width {length}?,
+               attribute altimg-height {length}?,
+               attribute altimg-valign {length | "top" | "middle" | "bottom"}?,
+               attribute alttext {text}?,
+               attribute cdgroup {xsd:anyURI}?,
+               math.deprecatedattributes
+
+# the mathml3-presentation schema  adds additional attributes
+# to the math element, all those valid on mstyle
+
+math.deprecatedattributes = attribute mode {xsd:string}?,
+                            attribute macros {xsd:string}?
+
+
+name = attribute name {xsd:NCName}
+cd = attribute cd {xsd:NCName}
+
+src = attribute src {xsd:anyURI}?
+
+annotation = element annotation {annotation.attributes,text}
+                     
+annotation-xml.model = (MathExpression|anyElement)*
+
+anyElement =  element (* - m:*) {(attribute * {text}|text| anyElement)*}
+
+annotation-xml = element annotation-xml {annotation.attributes,
+                                         annotation-xml.model}
+annotation.attributes = CommonAtt,
+	                cd?,
+                        name?,
+                        DefEncAtt,
+                        src?
+
+DefEncAtt = attribute encoding {xsd:string}?,
+            attribute definitionURL {xsd:anyURI}?
+
+semantics = element semantics {semantics.attributes,
+                               MathExpression, 
+                              (annotation|annotation-xml)*}
+semantics.attributes = CommonAtt,DefEncAtt,cd?,name?
+
+
+
+length = xsd:string {
+  pattern = '\s*((-?[0-9]*(\.[0-9]*)?(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*' 
+}
+

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rng
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rng?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rng (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-common.rng Mon Sep 19 05:43:23 2011
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+      This is the Mathematical Markup Language (MathML) 3.0, an XML
+      application for describing mathematical notation and capturing
+      both its structure and content.
+  
+      Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
+  
+      Use and distribution of this code are permitted under the terms
+      W3C Software Notice and License
+      http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+-->
+<grammar ns="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <start>
+    <ref name="math"/>
+  </start>
+  <define name="math">
+    <element name="math">
+      <ref name="math.attributes"/>
+      <zeroOrMore>
+        <ref name="MathExpression"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="MathExpression">
+    <ref name="semantics"/>
+  </define>
+  <define name="NonMathMLAtt">
+    <attribute>
+      <anyName>
+        <except>
+          <nsName ns=""/>
+          <nsName/>
+        </except>
+      </anyName>
+      <data type="string"/>
+    </attribute>
+  </define>
+  <define name="CommonDeprecatedAtt">
+    <optional>
+      <attribute name="other"/>
+    </optional>
+  </define>
+  <define name="CommonAtt">
+    <optional>
+      <attribute name="id">
+        <data type="ID"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="xref"/>
+    </optional>
+    <optional>
+      <attribute name="class">
+        <data type="NMTOKENS"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="style">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="href">
+        <data type="anyURI"/>
+      </attribute>
+    </optional>
+    <ref name="CommonDeprecatedAtt"/>
+    <zeroOrMore>
+      <ref name="NonMathMLAtt"/>
+    </zeroOrMore>
+  </define>
+  <define name="math.attributes">
+    <ref name="CommonAtt"/>
+    <optional>
+      <attribute name="display">
+        <choice>
+          <value>block</value>
+          <value>inline</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="maxwidth">
+        <ref name="length"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="overflow">
+        <choice>
+          <value>linebreak</value>
+          <value>scroll</value>
+          <value>elide</value>
+          <value>truncate</value>
+          <value>scale</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="altimg">
+        <data type="anyURI"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="altimg-width">
+        <ref name="length"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="altimg-height">
+        <ref name="length"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="altimg-valign">
+        <choice>
+          <ref name="length"/>
+          <value>top</value>
+          <value>middle</value>
+          <value>bottom</value>
+        </choice>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="alttext"/>
+    </optional>
+    <optional>
+      <attribute name="cdgroup">
+        <data type="anyURI"/>
+      </attribute>
+    </optional>
+    <ref name="math.deprecatedattributes"/>
+  </define>
+  <!--
+    the mathml3-presentation schema  adds additional attributes
+    to the math element, all those valid on mstyle
+  -->
+  <define name="math.deprecatedattributes">
+    <optional>
+      <attribute name="mode">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="macros">
+        <data type="string"/>
+      </attribute>
+    </optional>
+  </define>
+  <define name="name">
+    <attribute name="name">
+      <data type="NCName"/>
+    </attribute>
+  </define>
+  <define name="cd">
+    <attribute name="cd">
+      <data type="NCName"/>
+    </attribute>
+  </define>
+  <define name="src">
+    <optional>
+      <attribute name="src">
+        <data type="anyURI"/>
+      </attribute>
+    </optional>
+  </define>
+  <define name="annotation">
+    <element name="annotation">
+      <ref name="annotation.attributes"/>
+      <text/>
+    </element>
+  </define>
+  <define name="annotation-xml.model">
+    <zeroOrMore>
+      <choice>
+        <ref name="MathExpression"/>
+        <ref name="anyElement"/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="anyElement">
+    <element>
+      <anyName>
+        <except>
+          <nsName/>
+        </except>
+      </anyName>
+      <zeroOrMore>
+        <choice>
+          <attribute>
+            <anyName/>
+          </attribute>
+          <text/>
+          <ref name="anyElement"/>
+        </choice>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="annotation-xml">
+    <element name="annotation-xml">
+      <ref name="annotation.attributes"/>
+      <ref name="annotation-xml.model"/>
+    </element>
+  </define>
+  <define name="annotation.attributes">
+    <ref name="CommonAtt"/>
+    <optional>
+      <ref name="cd"/>
+    </optional>
+    <optional>
+      <ref name="name"/>
+    </optional>
+    <ref name="DefEncAtt"/>
+    <optional>
+      <ref name="src"/>
+    </optional>
+  </define>
+  <define name="DefEncAtt">
+    <optional>
+      <attribute name="encoding">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="definitionURL">
+        <data type="anyURI"/>
+      </attribute>
+    </optional>
+  </define>
+  <define name="semantics">
+    <element name="semantics">
+      <ref name="semantics.attributes"/>
+      <ref name="MathExpression"/>
+      <zeroOrMore>
+        <choice>
+          <ref name="annotation"/>
+          <ref name="annotation-xml"/>
+        </choice>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="semantics.attributes">
+    <ref name="CommonAtt"/>
+    <ref name="DefEncAtt"/>
+    <optional>
+      <ref name="cd"/>
+    </optional>
+    <optional>
+      <ref name="name"/>
+    </optional>
+  </define>
+  <define name="length">
+    <data type="string">
+      <param name="pattern">\s*((-?[0-9]*(\.[0-9]*)?(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*</param>
+    </data>
+  </define>
+</grammar>

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rnc
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rnc?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rnc (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rnc Mon Sep 19 05:43:23 2011
@@ -0,0 +1,373 @@
+
+#     This is the Mathematical Markup Language (MathML) 3.0, an XML
+#     application for describing mathematical notation and capturing
+#     both its structure and content.
+#
+#     Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
+# 
+#     Use and distribution of this code are permitted under the terms
+#     W3C Software Notice and License
+#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+include "mathml3-strict-content.rnc"{
+  cn.content = (text | mglyph | sep | PresentationExpression)* 
+  cn.attributes = CommonAtt, DefEncAtt, attribute type {text}?, base?
+
+  ci.attributes = CommonAtt, DefEncAtt, ci.type?
+  ci.type = attribute type {text}
+  ci.content = (text | mglyph | PresentationExpression)* 
+
+  csymbol.attributes = CommonAtt, DefEncAtt, attribute type {text}?,cd?
+  csymbol.content = (text | mglyph | PresentationExpression)* 
+
+  bvar = element bvar { (ci | semantics-ci) & degree?}
+
+  cbytes.attributes = CommonAtt, DefEncAtt
+
+  cs.attributes = CommonAtt, DefEncAtt
+
+  apply.content = ContExp+ | (ContExp, BvarQ, Qualifier*, ContExp*)
+
+  bind.content = apply.content
+}
+
+base = attribute base {text}
+
+
+sep = element sep {empty}
+PresentationExpression |= notAllowed
+
+
+DomainQ = (domainofapplication|condition|interval|(lowlimit,uplimit?))*
+domainofapplication = element domainofapplication {ContExp}
+condition = element condition {ContExp}
+uplimit = element uplimit {ContExp}
+lowlimit = element lowlimit {ContExp}
+
+Qualifier = DomainQ|degree|momentabout|logbase
+degree = element degree {ContExp}
+momentabout = element momentabout {ContExp}
+logbase = element logbase {ContExp}
+
+type = attribute type {text}
+order = attribute order {"numeric" | "lexicographic"}
+closure = attribute closure {text}
+
+
+ContExp |= piecewise
+
+
+piecewise = element piecewise {CommonAtt, DefEncAtt,(piece* & otherwise?)}
+
+piece = element piece {CommonAtt, DefEncAtt, ContExp, ContExp}
+
+otherwise = element otherwise {CommonAtt, DefEncAtt, ContExp}
+
+
+DeprecatedContExp = reln | fn | declare
+ContExp |= DeprecatedContExp
+
+reln = element reln {ContExp*}
+fn = element fn {ContExp}
+declare = element declare {attribute type {xsd:string}?,
+                           attribute scope {xsd:string}?,
+                           attribute nargs {xsd:nonNegativeInteger}?,
+                           attribute occurrence {"prefix"|"infix"|"function-model"}?,
+                           DefEncAtt, 
+                           ContExp+}
+
+
+interval.class = interval
+ContExp |= interval.class
+
+
+interval = element interval { CommonAtt, DefEncAtt,closure?, ContExp,ContExp}
+
+unary-functional.class = inverse | ident | domain | codomain | image | ln | log | moment
+ContExp |= unary-functional.class
+
+
+inverse = element inverse { CommonAtt, DefEncAtt, empty}
+ident = element ident { CommonAtt, DefEncAtt, empty}
+domain = element domain { CommonAtt, DefEncAtt, empty}
+codomain = element codomain { CommonAtt, DefEncAtt, empty}
+image = element image { CommonAtt, DefEncAtt, empty}
+ln = element ln { CommonAtt, DefEncAtt, empty}
+log = element log { CommonAtt, DefEncAtt, empty}
+moment = element moment { CommonAtt, DefEncAtt, empty}
+
+lambda.class = lambda
+ContExp |= lambda.class
+
+
+lambda = element lambda { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp}
+
+nary-functional.class = compose
+ContExp |= nary-functional.class
+
+
+compose = element compose { CommonAtt, DefEncAtt, empty}
+
+binary-arith.class = quotient | divide | minus | power | rem | root
+ContExp |= binary-arith.class
+
+
+quotient = element quotient { CommonAtt, DefEncAtt, empty}
+divide = element divide { CommonAtt, DefEncAtt, empty}
+minus = element minus { CommonAtt, DefEncAtt, empty}
+power = element power { CommonAtt, DefEncAtt, empty}
+rem = element rem { CommonAtt, DefEncAtt, empty}
+root = element root { CommonAtt, DefEncAtt, empty}
+
+unary-arith.class = factorial | minus | root | abs | conjugate | arg | real | imaginary | floor | ceiling | exp
+ContExp |= unary-arith.class
+
+
+factorial = element factorial { CommonAtt, DefEncAtt, empty}
+abs = element abs { CommonAtt, DefEncAtt, empty}
+conjugate = element conjugate { CommonAtt, DefEncAtt, empty}
+arg = element arg { CommonAtt, DefEncAtt, empty}
+real = element real { CommonAtt, DefEncAtt, empty}
+imaginary = element imaginary { CommonAtt, DefEncAtt, empty}
+floor = element floor { CommonAtt, DefEncAtt, empty}
+ceiling = element ceiling { CommonAtt, DefEncAtt, empty}
+exp = element exp { CommonAtt, DefEncAtt, empty}
+
+nary-minmax.class = max | min
+ContExp |= nary-minmax.class
+
+
+max = element max { CommonAtt, DefEncAtt, empty}
+min = element min { CommonAtt, DefEncAtt, empty}
+
+nary-arith.class = plus | times | gcd | lcm
+ContExp |= nary-arith.class
+
+
+plus = element plus { CommonAtt, DefEncAtt, empty}
+times = element times { CommonAtt, DefEncAtt, empty}
+gcd = element gcd { CommonAtt, DefEncAtt, empty}
+lcm = element lcm { CommonAtt, DefEncAtt, empty}
+
+nary-logical.class = and | or | xor
+ContExp |= nary-logical.class
+
+
+and = element and { CommonAtt, DefEncAtt, empty}
+or = element or { CommonAtt, DefEncAtt, empty}
+xor = element xor { CommonAtt, DefEncAtt, empty}
+
+unary-logical.class = not
+ContExp |= unary-logical.class
+
+
+not = element not { CommonAtt, DefEncAtt, empty}
+
+binary-logical.class = implies | equivalent
+ContExp |= binary-logical.class
+
+
+implies = element implies { CommonAtt, DefEncAtt, empty}
+equivalent = element equivalent { CommonAtt, DefEncAtt, empty}
+
+quantifier.class = forall | exists
+ContExp |= quantifier.class
+
+
+forall = element forall { CommonAtt, DefEncAtt, empty}
+exists = element exists { CommonAtt, DefEncAtt, empty}
+
+nary-reln.class = eq | gt | lt | geq | leq
+ContExp |= nary-reln.class
+
+
+eq = element eq { CommonAtt, DefEncAtt, empty}
+gt = element gt { CommonAtt, DefEncAtt, empty}
+lt = element lt { CommonAtt, DefEncAtt, empty}
+geq = element geq { CommonAtt, DefEncAtt, empty}
+leq = element leq { CommonAtt, DefEncAtt, empty}
+
+binary-reln.class = neq | approx | factorof | tendsto
+ContExp |= binary-reln.class
+
+
+neq = element neq { CommonAtt, DefEncAtt, empty}
+approx = element approx { CommonAtt, DefEncAtt, empty}
+factorof = element factorof { CommonAtt, DefEncAtt, empty}
+tendsto = element tendsto { CommonAtt, DefEncAtt, type?, empty}
+
+int.class = int
+ContExp |= int.class
+
+
+int = element int { CommonAtt, DefEncAtt, empty}
+
+Differential-Operator.class = diff
+ContExp |= Differential-Operator.class
+
+
+diff = element diff { CommonAtt, DefEncAtt, empty}
+
+partialdiff.class = partialdiff
+ContExp |= partialdiff.class
+
+
+partialdiff = element partialdiff { CommonAtt, DefEncAtt, empty}
+
+unary-veccalc.class = divergence | grad | curl | laplacian
+ContExp |= unary-veccalc.class
+
+
+divergence = element divergence { CommonAtt, DefEncAtt, empty}
+grad = element grad { CommonAtt, DefEncAtt, empty}
+curl = element curl { CommonAtt, DefEncAtt, empty}
+laplacian = element laplacian { CommonAtt, DefEncAtt, empty}
+
+nary-setlist-constructor.class = set | \list
+ContExp |= nary-setlist-constructor.class
+
+
+set = element set { CommonAtt, DefEncAtt, type?, BvarQ*, DomainQ*, ContExp*}
+\list = element \list { CommonAtt, DefEncAtt, order?, BvarQ*, DomainQ*, ContExp*}
+
+nary-set.class = union | intersect | cartesianproduct
+ContExp |= nary-set.class
+
+
+union = element union { CommonAtt, DefEncAtt, empty}
+intersect = element intersect { CommonAtt, DefEncAtt, empty}
+cartesianproduct = element cartesianproduct { CommonAtt, DefEncAtt, empty}
+
+binary-set.class = in | notin | notsubset | notprsubset | setdiff
+ContExp |= binary-set.class
+
+
+in = element in { CommonAtt, DefEncAtt, empty}
+notin = element notin { CommonAtt, DefEncAtt, empty}
+notsubset = element notsubset { CommonAtt, DefEncAtt, empty}
+notprsubset = element notprsubset { CommonAtt, DefEncAtt, empty}
+setdiff = element setdiff { CommonAtt, DefEncAtt, empty}
+
+nary-set-reln.class = subset | prsubset
+ContExp |= nary-set-reln.class
+
+
+subset = element subset { CommonAtt, DefEncAtt, empty}
+prsubset = element prsubset { CommonAtt, DefEncAtt, empty}
+
+unary-set.class = card
+ContExp |= unary-set.class
+
+
+card = element card { CommonAtt, DefEncAtt, empty}
+
+sum.class = sum
+ContExp |= sum.class
+
+
+sum = element sum { CommonAtt, DefEncAtt, empty}
+
+product.class = product
+ContExp |= product.class
+
+
+product = element product { CommonAtt, DefEncAtt, empty}
+
+limit.class = limit
+ContExp |= limit.class
+
+
+limit = element limit { CommonAtt, DefEncAtt, empty}
+
+unary-elementary.class = sin | cos | tan | sec | csc | cot | sinh | cosh | tanh | sech | csch | coth | arcsin | arccos | arctan | arccosh | arccot | arccoth | arccsc | arccsch | arcsec | arcsech | arcsinh | arctanh
+ContExp |= unary-elementary.class
+
+
+sin = element sin { CommonAtt, DefEncAtt, empty}
+cos = element cos { CommonAtt, DefEncAtt, empty}
+tan = element tan { CommonAtt, DefEncAtt, empty}
+sec = element sec { CommonAtt, DefEncAtt, empty}
+csc = element csc { CommonAtt, DefEncAtt, empty}
+cot = element cot { CommonAtt, DefEncAtt, empty}
+sinh = element sinh { CommonAtt, DefEncAtt, empty}
+cosh = element cosh { CommonAtt, DefEncAtt, empty}
+tanh = element tanh { CommonAtt, DefEncAtt, empty}
+sech = element sech { CommonAtt, DefEncAtt, empty}
+csch = element csch { CommonAtt, DefEncAtt, empty}
+coth = element coth { CommonAtt, DefEncAtt, empty}
+arcsin = element arcsin { CommonAtt, DefEncAtt, empty}
+arccos = element arccos { CommonAtt, DefEncAtt, empty}
+arctan = element arctan { CommonAtt, DefEncAtt, empty}
+arccosh = element arccosh { CommonAtt, DefEncAtt, empty}
+arccot = element arccot { CommonAtt, DefEncAtt, empty}
+arccoth = element arccoth { CommonAtt, DefEncAtt, empty}
+arccsc = element arccsc { CommonAtt, DefEncAtt, empty}
+arccsch = element arccsch { CommonAtt, DefEncAtt, empty}
+arcsec = element arcsec { CommonAtt, DefEncAtt, empty}
+arcsech = element arcsech { CommonAtt, DefEncAtt, empty}
+arcsinh = element arcsinh { CommonAtt, DefEncAtt, empty}
+arctanh = element arctanh { CommonAtt, DefEncAtt, empty}
+
+nary-stats.class = mean | sdev | variance | median | mode
+ContExp |= nary-stats.class
+
+
+mean = element mean { CommonAtt, DefEncAtt, empty}
+sdev = element sdev { CommonAtt, DefEncAtt, empty}
+variance = element variance { CommonAtt, DefEncAtt, empty}
+median = element median { CommonAtt, DefEncAtt, empty}
+mode = element mode { CommonAtt, DefEncAtt, empty}
+
+nary-constructor.class = vector | matrix | matrixrow
+ContExp |= nary-constructor.class
+
+
+vector = element vector { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*}
+matrix = element matrix { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*}
+matrixrow = element matrixrow { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*}
+
+unary-linalg.class = determinant | transpose
+ContExp |= unary-linalg.class
+
+
+determinant = element determinant { CommonAtt, DefEncAtt, empty}
+transpose = element transpose { CommonAtt, DefEncAtt, empty}
+
+nary-linalg.class = selector
+ContExp |= nary-linalg.class
+
+
+selector = element selector { CommonAtt, DefEncAtt, empty}
+
+binary-linalg.class = vectorproduct | scalarproduct | outerproduct
+ContExp |= binary-linalg.class
+
+
+vectorproduct = element vectorproduct { CommonAtt, DefEncAtt, empty}
+scalarproduct = element scalarproduct { CommonAtt, DefEncAtt, empty}
+outerproduct = element outerproduct { CommonAtt, DefEncAtt, empty}
+
+constant-set.class = integers | reals | rationals | naturalnumbers | complexes | primes | emptyset
+ContExp |= constant-set.class
+
+
+integers = element integers { CommonAtt, DefEncAtt, empty}
+reals = element reals { CommonAtt, DefEncAtt, empty}
+rationals = element rationals { CommonAtt, DefEncAtt, empty}
+naturalnumbers = element naturalnumbers { CommonAtt, DefEncAtt, empty}
+complexes = element complexes { CommonAtt, DefEncAtt, empty}
+primes = element primes { CommonAtt, DefEncAtt, empty}
+emptyset = element emptyset { CommonAtt, DefEncAtt, empty}
+
+constant-arith.class = exponentiale | imaginaryi | notanumber | true | false | pi | eulergamma | infinity
+ContExp |= constant-arith.class
+
+
+exponentiale = element exponentiale { CommonAtt, DefEncAtt, empty}
+imaginaryi = element imaginaryi { CommonAtt, DefEncAtt, empty}
+notanumber = element notanumber { CommonAtt, DefEncAtt, empty}
+true = element true { CommonAtt, DefEncAtt, empty}
+false = element false { CommonAtt, DefEncAtt, empty}
+pi = element pi { CommonAtt, DefEncAtt, empty}
+eulergamma = element eulergamma { CommonAtt, DefEncAtt, empty}
+infinity = element infinity { CommonAtt, DefEncAtt, empty}
\ No newline at end of file

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rng
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rng?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rng (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-content.rng Mon Sep 19 05:43:23 2011
@@ -0,0 +1,1543 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <!--
+        This is the Mathematical Markup Language (MathML) 3.0, an XML
+        application for describing mathematical notation and capturing
+        both its structure and content.
+    
+        Copyright 1998-2010 W3C (MIT, ERCIM, Keio)
+    
+        Use and distribution of this code are permitted under the terms
+        W3C Software Notice and License
+        http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+  -->
+  <include href="mathml3-strict-content.rng">
+    <define name="cn.content">
+      <zeroOrMore>
+        <choice>
+          <text/>
+          <ref name="mglyph"/>
+          <ref name="sep"/>
+          <ref name="PresentationExpression"/>
+        </choice>
+      </zeroOrMore>
+    </define>
+    <define name="cn.attributes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <attribute name="type"/>
+      </optional>
+      <optional>
+        <ref name="base"/>
+      </optional>
+    </define>
+    <define name="ci.attributes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <ref name="ci.type"/>
+      </optional>
+    </define>
+    <define name="ci.type">
+      <attribute name="type"/>
+    </define>
+    <define name="ci.content">
+      <zeroOrMore>
+        <choice>
+          <text/>
+          <ref name="mglyph"/>
+          <ref name="PresentationExpression"/>
+        </choice>
+      </zeroOrMore>
+    </define>
+    <define name="csymbol.attributes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <attribute name="type"/>
+      </optional>
+      <optional>
+        <ref name="cd"/>
+      </optional>
+    </define>
+    <define name="csymbol.content">
+      <zeroOrMore>
+        <choice>
+          <text/>
+          <ref name="mglyph"/>
+          <ref name="PresentationExpression"/>
+        </choice>
+      </zeroOrMore>
+    </define>
+    <define name="bvar">
+      <element name="bvar">
+        <interleave>
+          <choice>
+            <ref name="ci"/>
+            <ref name="semantics-ci"/>
+          </choice>
+          <optional>
+            <ref name="degree"/>
+          </optional>
+        </interleave>
+      </element>
+    </define>
+    <define name="cbytes.attributes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+    </define>
+    <define name="cs.attributes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+    </define>
+    <define name="apply.content">
+      <choice>
+        <oneOrMore>
+          <ref name="ContExp"/>
+        </oneOrMore>
+        <group>
+          <ref name="ContExp"/>
+          <ref name="BvarQ"/>
+          <zeroOrMore>
+            <ref name="Qualifier"/>
+          </zeroOrMore>
+          <zeroOrMore>
+            <ref name="ContExp"/>
+          </zeroOrMore>
+        </group>
+      </choice>
+    </define>
+    <define name="bind.content">
+      <ref name="apply.content"/>
+    </define>
+  </include>
+  <define name="base">
+    <attribute name="base"/>
+  </define>
+  <define name="sep">
+    <element name="sep">
+      <empty/>
+    </element>
+  </define>
+  <define name="PresentationExpression" combine="choice">
+    <notAllowed/>
+  </define>
+  <define name="DomainQ">
+    <zeroOrMore>
+      <choice>
+        <ref name="domainofapplication"/>
+        <ref name="condition"/>
+        <ref name="interval"/>
+        <group>
+          <ref name="lowlimit"/>
+          <optional>
+            <ref name="uplimit"/>
+          </optional>
+        </group>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="domainofapplication">
+    <element name="domainofapplication">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="condition">
+    <element name="condition">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="uplimit">
+    <element name="uplimit">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="lowlimit">
+    <element name="lowlimit">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="Qualifier">
+    <choice>
+      <ref name="DomainQ"/>
+      <ref name="degree"/>
+      <ref name="momentabout"/>
+      <ref name="logbase"/>
+    </choice>
+  </define>
+  <define name="degree">
+    <element name="degree">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="momentabout">
+    <element name="momentabout">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="logbase">
+    <element name="logbase">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="type">
+    <attribute name="type"/>
+  </define>
+  <define name="order">
+    <attribute name="order">
+      <choice>
+        <value>numeric</value>
+        <value>lexicographic</value>
+      </choice>
+    </attribute>
+  </define>
+  <define name="closure">
+    <attribute name="closure"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="piecewise"/>
+  </define>
+  <define name="piecewise">
+    <element name="piecewise">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <interleave>
+        <zeroOrMore>
+          <ref name="piece"/>
+        </zeroOrMore>
+        <optional>
+          <ref name="otherwise"/>
+        </optional>
+      </interleave>
+    </element>
+  </define>
+  <define name="piece">
+    <element name="piece">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <ref name="ContExp"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="otherwise">
+    <element name="otherwise">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="DeprecatedContExp">
+    <choice>
+      <ref name="reln"/>
+      <ref name="fn"/>
+      <ref name="declare"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="DeprecatedContExp"/>
+  </define>
+  <define name="reln">
+    <element name="reln">
+      <zeroOrMore>
+        <ref name="ContExp"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="fn">
+    <element name="fn">
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="declare">
+    <element name="declare">
+      <optional>
+        <attribute name="type">
+          <data type="string"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="scope">
+          <data type="string"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="nargs">
+          <data type="nonNegativeInteger"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="occurrence">
+          <choice>
+            <value>prefix</value>
+            <value>infix</value>
+            <value>function-model</value>
+          </choice>
+        </attribute>
+      </optional>
+      <ref name="DefEncAtt"/>
+      <oneOrMore>
+        <ref name="ContExp"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="interval.class">
+    <ref name="interval"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="interval.class"/>
+  </define>
+  <define name="interval">
+    <element name="interval">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <ref name="closure"/>
+      </optional>
+      <ref name="ContExp"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="unary-functional.class">
+    <choice>
+      <ref name="inverse"/>
+      <ref name="ident"/>
+      <ref name="domain"/>
+      <ref name="codomain"/>
+      <ref name="image"/>
+      <ref name="ln"/>
+      <ref name="log"/>
+      <ref name="moment"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-functional.class"/>
+  </define>
+  <define name="inverse">
+    <element name="inverse">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="ident">
+    <element name="ident">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="domain">
+    <element name="domain">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="codomain">
+    <element name="codomain">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="image">
+    <element name="image">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="ln">
+    <element name="ln">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="log">
+    <element name="log">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="moment">
+    <element name="moment">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="lambda.class">
+    <ref name="lambda"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="lambda.class"/>
+  </define>
+  <define name="lambda">
+    <element name="lambda">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <ref name="BvarQ"/>
+      <ref name="DomainQ"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="nary-functional.class">
+    <ref name="compose"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-functional.class"/>
+  </define>
+  <define name="compose">
+    <element name="compose">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="binary-arith.class">
+    <choice>
+      <ref name="quotient"/>
+      <ref name="divide"/>
+      <ref name="minus"/>
+      <ref name="power"/>
+      <ref name="rem"/>
+      <ref name="root"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="binary-arith.class"/>
+  </define>
+  <define name="quotient">
+    <element name="quotient">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="divide">
+    <element name="divide">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="minus">
+    <element name="minus">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="power">
+    <element name="power">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="rem">
+    <element name="rem">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="root">
+    <element name="root">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="unary-arith.class">
+    <choice>
+      <ref name="factorial"/>
+      <ref name="minus"/>
+      <ref name="root"/>
+      <ref name="abs"/>
+      <ref name="conjugate"/>
+      <ref name="arg"/>
+      <ref name="real"/>
+      <ref name="imaginary"/>
+      <ref name="floor"/>
+      <ref name="ceiling"/>
+      <ref name="exp"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-arith.class"/>
+  </define>
+  <define name="factorial">
+    <element name="factorial">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="abs">
+    <element name="abs">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="conjugate">
+    <element name="conjugate">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arg">
+    <element name="arg">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="real">
+    <element name="real">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="imaginary">
+    <element name="imaginary">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="floor">
+    <element name="floor">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="ceiling">
+    <element name="ceiling">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="exp">
+    <element name="exp">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-minmax.class">
+    <choice>
+      <ref name="max"/>
+      <ref name="min"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-minmax.class"/>
+  </define>
+  <define name="max">
+    <element name="max">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="min">
+    <element name="min">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-arith.class">
+    <choice>
+      <ref name="plus"/>
+      <ref name="times"/>
+      <ref name="gcd"/>
+      <ref name="lcm"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-arith.class"/>
+  </define>
+  <define name="plus">
+    <element name="plus">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="times">
+    <element name="times">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="gcd">
+    <element name="gcd">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="lcm">
+    <element name="lcm">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-logical.class">
+    <choice>
+      <ref name="and"/>
+      <ref name="or"/>
+      <ref name="xor"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-logical.class"/>
+  </define>
+  <define name="and">
+    <element name="and">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="or">
+    <element name="or">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="xor">
+    <element name="xor">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="unary-logical.class">
+    <ref name="not"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-logical.class"/>
+  </define>
+  <define name="not">
+    <element name="not">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="binary-logical.class">
+    <choice>
+      <ref name="implies"/>
+      <ref name="equivalent"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="binary-logical.class"/>
+  </define>
+  <define name="implies">
+    <element name="implies">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="equivalent">
+    <element name="equivalent">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="quantifier.class">
+    <choice>
+      <ref name="forall"/>
+      <ref name="exists"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="quantifier.class"/>
+  </define>
+  <define name="forall">
+    <element name="forall">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="exists">
+    <element name="exists">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-reln.class">
+    <choice>
+      <ref name="eq"/>
+      <ref name="gt"/>
+      <ref name="lt"/>
+      <ref name="geq"/>
+      <ref name="leq"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-reln.class"/>
+  </define>
+  <define name="eq">
+    <element name="eq">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="gt">
+    <element name="gt">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="lt">
+    <element name="lt">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="geq">
+    <element name="geq">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="leq">
+    <element name="leq">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="binary-reln.class">
+    <choice>
+      <ref name="neq"/>
+      <ref name="approx"/>
+      <ref name="factorof"/>
+      <ref name="tendsto"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="binary-reln.class"/>
+  </define>
+  <define name="neq">
+    <element name="neq">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="approx">
+    <element name="approx">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="factorof">
+    <element name="factorof">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="tendsto">
+    <element name="tendsto">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <ref name="type"/>
+      </optional>
+      <empty/>
+    </element>
+  </define>
+  <define name="int.class">
+    <ref name="int"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="int.class"/>
+  </define>
+  <define name="int">
+    <element name="int">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="Differential-Operator.class">
+    <ref name="diff"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="Differential-Operator.class"/>
+  </define>
+  <define name="diff">
+    <element name="diff">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="partialdiff.class">
+    <ref name="partialdiff"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="partialdiff.class"/>
+  </define>
+  <define name="partialdiff">
+    <element name="partialdiff">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="unary-veccalc.class">
+    <choice>
+      <ref name="divergence"/>
+      <ref name="grad"/>
+      <ref name="curl"/>
+      <ref name="laplacian"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-veccalc.class"/>
+  </define>
+  <define name="divergence">
+    <element name="divergence">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="grad">
+    <element name="grad">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="curl">
+    <element name="curl">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="laplacian">
+    <element name="laplacian">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-setlist-constructor.class">
+    <choice>
+      <ref name="set"/>
+      <ref name="list"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-setlist-constructor.class"/>
+  </define>
+  <define name="set">
+    <element name="set">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <ref name="type"/>
+      </optional>
+      <zeroOrMore>
+        <ref name="BvarQ"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="DomainQ"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="ContExp"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="list">
+    <element name="list">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <optional>
+        <ref name="order"/>
+      </optional>
+      <zeroOrMore>
+        <ref name="BvarQ"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="DomainQ"/>
+      </zeroOrMore>
+      <zeroOrMore>
+        <ref name="ContExp"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="nary-set.class">
+    <choice>
+      <ref name="union"/>
+      <ref name="intersect"/>
+      <ref name="cartesianproduct"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-set.class"/>
+  </define>
+  <define name="union">
+    <element name="union">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="intersect">
+    <element name="intersect">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="cartesianproduct">
+    <element name="cartesianproduct">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="binary-set.class">
+    <choice>
+      <ref name="in"/>
+      <ref name="notin"/>
+      <ref name="notsubset"/>
+      <ref name="notprsubset"/>
+      <ref name="setdiff"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="binary-set.class"/>
+  </define>
+  <define name="in">
+    <element name="in">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="notin">
+    <element name="notin">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="notsubset">
+    <element name="notsubset">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="notprsubset">
+    <element name="notprsubset">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="setdiff">
+    <element name="setdiff">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-set-reln.class">
+    <choice>
+      <ref name="subset"/>
+      <ref name="prsubset"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-set-reln.class"/>
+  </define>
+  <define name="subset">
+    <element name="subset">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="prsubset">
+    <element name="prsubset">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="unary-set.class">
+    <ref name="card"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-set.class"/>
+  </define>
+  <define name="card">
+    <element name="card">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="sum.class">
+    <ref name="sum"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="sum.class"/>
+  </define>
+  <define name="sum">
+    <element name="sum">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="product.class">
+    <ref name="product"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="product.class"/>
+  </define>
+  <define name="product">
+    <element name="product">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="limit.class">
+    <ref name="limit"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="limit.class"/>
+  </define>
+  <define name="limit">
+    <element name="limit">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="unary-elementary.class">
+    <choice>
+      <ref name="sin"/>
+      <ref name="cos"/>
+      <ref name="tan"/>
+      <ref name="sec"/>
+      <ref name="csc"/>
+      <ref name="cot"/>
+      <ref name="sinh"/>
+      <ref name="cosh"/>
+      <ref name="tanh"/>
+      <ref name="sech"/>
+      <ref name="csch"/>
+      <ref name="coth"/>
+      <ref name="arcsin"/>
+      <ref name="arccos"/>
+      <ref name="arctan"/>
+      <ref name="arccosh"/>
+      <ref name="arccot"/>
+      <ref name="arccoth"/>
+      <ref name="arccsc"/>
+      <ref name="arccsch"/>
+      <ref name="arcsec"/>
+      <ref name="arcsech"/>
+      <ref name="arcsinh"/>
+      <ref name="arctanh"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-elementary.class"/>
+  </define>
+  <define name="sin">
+    <element name="sin">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="cos">
+    <element name="cos">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="tan">
+    <element name="tan">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="sec">
+    <element name="sec">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="csc">
+    <element name="csc">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="cot">
+    <element name="cot">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="sinh">
+    <element name="sinh">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="cosh">
+    <element name="cosh">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="tanh">
+    <element name="tanh">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="sech">
+    <element name="sech">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="csch">
+    <element name="csch">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="coth">
+    <element name="coth">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arcsin">
+    <element name="arcsin">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arccos">
+    <element name="arccos">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arctan">
+    <element name="arctan">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arccosh">
+    <element name="arccosh">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arccot">
+    <element name="arccot">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arccoth">
+    <element name="arccoth">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arccsc">
+    <element name="arccsc">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arccsch">
+    <element name="arccsch">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arcsec">
+    <element name="arcsec">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arcsech">
+    <element name="arcsech">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arcsinh">
+    <element name="arcsinh">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="arctanh">
+    <element name="arctanh">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-stats.class">
+    <choice>
+      <ref name="mean"/>
+      <ref name="sdev"/>
+      <ref name="variance"/>
+      <ref name="median"/>
+      <ref name="mode"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-stats.class"/>
+  </define>
+  <define name="mean">
+    <element name="mean">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="sdev">
+    <element name="sdev">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="variance">
+    <element name="variance">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="median">
+    <element name="median">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="mode">
+    <element name="mode">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-constructor.class">
+    <choice>
+      <ref name="vector"/>
+      <ref name="matrix"/>
+      <ref name="matrixrow"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-constructor.class"/>
+  </define>
+  <define name="vector">
+    <element name="vector">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <ref name="BvarQ"/>
+      <ref name="DomainQ"/>
+      <zeroOrMore>
+        <ref name="ContExp"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="matrix">
+    <element name="matrix">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <ref name="BvarQ"/>
+      <ref name="DomainQ"/>
+      <zeroOrMore>
+        <ref name="ContExp"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="matrixrow">
+    <element name="matrixrow">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <ref name="BvarQ"/>
+      <ref name="DomainQ"/>
+      <zeroOrMore>
+        <ref name="ContExp"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="unary-linalg.class">
+    <choice>
+      <ref name="determinant"/>
+      <ref name="transpose"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="unary-linalg.class"/>
+  </define>
+  <define name="determinant">
+    <element name="determinant">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="transpose">
+    <element name="transpose">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="nary-linalg.class">
+    <ref name="selector"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="nary-linalg.class"/>
+  </define>
+  <define name="selector">
+    <element name="selector">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="binary-linalg.class">
+    <choice>
+      <ref name="vectorproduct"/>
+      <ref name="scalarproduct"/>
+      <ref name="outerproduct"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="binary-linalg.class"/>
+  </define>
+  <define name="vectorproduct">
+    <element name="vectorproduct">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="scalarproduct">
+    <element name="scalarproduct">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="outerproduct">
+    <element name="outerproduct">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="constant-set.class">
+    <choice>
+      <ref name="integers"/>
+      <ref name="reals"/>
+      <ref name="rationals"/>
+      <ref name="naturalnumbers"/>
+      <ref name="complexes"/>
+      <ref name="primes"/>
+      <ref name="emptyset"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="constant-set.class"/>
+  </define>
+  <define name="integers">
+    <element name="integers">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="reals">
+    <element name="reals">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="rationals">
+    <element name="rationals">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="naturalnumbers">
+    <element name="naturalnumbers">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="complexes">
+    <element name="complexes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="primes">
+    <element name="primes">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="emptyset">
+    <element name="emptyset">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="constant-arith.class">
+    <choice>
+      <ref name="exponentiale"/>
+      <ref name="imaginaryi"/>
+      <ref name="notanumber"/>
+      <ref name="true"/>
+      <ref name="false"/>
+      <ref name="pi"/>
+      <ref name="eulergamma"/>
+      <ref name="infinity"/>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="constant-arith.class"/>
+  </define>
+  <define name="exponentiale">
+    <element name="exponentiale">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="imaginaryi">
+    <element name="imaginaryi">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="notanumber">
+    <element name="notanumber">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="true">
+    <element name="true">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="false">
+    <element name="false">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="pi">
+    <element name="pi">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="eulergamma">
+    <element name="eulergamma">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+  <define name="infinity">
+    <element name="infinity">
+      <ref name="CommonAtt"/>
+      <ref name="DefEncAtt"/>
+      <empty/>
+    </element>
+  </define>
+</grammar>

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rnc
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rnc?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rnc (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rnc Mon Sep 19 05:43:23 2011
@@ -0,0 +1,44 @@
+#     This is the Mathematical Markup Language (MathML) 3.0, an XML
+#     application for describing mathematical notation and capturing
+#     both its structure and content.
+#
+#     Copyright 1998-2008 W3C (MIT, ERCIM, Keio)
+# 
+#     Use and distribution of this code are permitted under the terms
+#     W3C Software Notice and License
+#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+#
+#
+#     Revision:   $Id: mathml3-deprecated.rnc,v 1.3 2008/11/15 22:00:48 dcarlis Exp $
+#
+#    Update to MathML3 and Relax NG: David Carlisle and Michael Kohlhase
+
+default namespace m = "http://www.w3.org/1998/Math/MathML"
+
+
+Token-style.attrib &=
+  attribute fontsize {xsd:string}? ,
+  attribute fontstyle {xsd:string}? ,
+  attribute fontweight {xsd:string}? ,
+  attribute color {xsd:string}? ,
+  attribute fontfamily {xsd:string}? ,
+  attribute fontweight {xsd:string}? 
+
+#Deprecated Content Elements
+dep-content = 
+  element reln {ContExp*}|
+  element fn {ContExp}
+
+ContExp |= dep-content
+
+apply-head |= dep-content
+
+declare = element declare {attribute type {xsd:string}?,
+                           attribute scope {xsd:string}?,
+                           attribute nargs {xsd:nonNegativeInteger}?,
+                           attribute occurrence {"prefix"|"infix"|"function-model"}?,
+                           Definition.attrib,cdbase.attrib?, 
+                           ContExp+}
+ContExp |= declare
+
+mtr.content |= ContInPres
\ No newline at end of file

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rng
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rng?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rng (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-deprecated.rng Mon Sep 19 05:43:23 2011
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+      This is the Mathematical Markup Language (MathML) 3.0, an XML
+      application for describing mathematical notation and capturing
+      both its structure and content.
+  
+      Copyright 1998-2008 W3C (MIT, ERCIM, Keio)
+  
+      Use and distribution of this code are permitted under the terms
+      W3C Software Notice and License
+      http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+  
+  
+      Revision:   $Id: mathml3-deprecated.rng,v 1.3 2008/11/15 22:00:48 dcarlis Exp $
+  
+     Update to MathML3 and Relax NG: David Carlisle and Michael Kohlhase
+-->
+<grammar ns="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+  <define name="Token-style.attrib" combine="interleave">
+    <optional>
+      <attribute name="fontsize">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="fontstyle">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="fontweight">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="color">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="fontfamily">
+        <data type="string"/>
+      </attribute>
+    </optional>
+    <optional>
+      <attribute name="fontweight">
+        <data type="string"/>
+      </attribute>
+    </optional>
+  </define>
+  <!-- Deprecated Content Elements -->
+  <define name="dep-content">
+    <choice>
+      <element name="reln">
+        <zeroOrMore>
+          <ref name="ContExp"/>
+        </zeroOrMore>
+      </element>
+      <element name="fn">
+        <ref name="ContExp"/>
+      </element>
+    </choice>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="dep-content"/>
+  </define>
+  <define name="apply-head" combine="choice">
+    <ref name="dep-content"/>
+  </define>
+  <define name="declare">
+    <element name="declare">
+      <optional>
+        <attribute name="type">
+          <data type="string"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="scope">
+          <data type="string"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="nargs">
+          <data type="nonNegativeInteger"/>
+        </attribute>
+      </optional>
+      <optional>
+        <attribute name="occurrence">
+          <choice>
+            <value>prefix</value>
+            <value>infix</value>
+            <value>function-model</value>
+          </choice>
+        </attribute>
+      </optional>
+      <ref name="Definition.attrib"/>
+      <optional>
+        <ref name="cdbase.attrib"/>
+      </optional>
+      <oneOrMore>
+        <ref name="ContExp"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="ContExp" combine="choice">
+    <ref name="declare"/>
+  </define>
+  <define name="mtr.content" combine="choice">
+    <ref name="ContInPres"/>
+  </define>
+</grammar>

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rnc
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rnc?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rnc (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rnc Mon Sep 19 05:43:23 2011
@@ -0,0 +1,96 @@
+#     This is the Mathematical Markup Language (MathML) 3.0, an XML
+#     application for describing mathematical notation and capturing
+#     both its structure and content.
+#
+#     Copyright 1998-2008 W3C (MIT, ERCIM, Keio)
+# 
+#     Use and distribution of this code are permitted under the terms
+#     W3C Software Notice and License
+#     http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+#
+#
+#   Revision: $Id: mathml3-pragmatic.rnc,v 1.4 2009/01/14 13:13:58 dcarlis Exp $
+#
+#     Update to MathML3 and Relax NG: David Carlisle and Michael Kohlhase
+#
+#     This is the RelaxNG schema module for the pragmatic content part of 
+#     MathML (but without the presentation in token elements).
+
+default namespace m = "http://www.w3.org/1998/Math/MathML"
+
+
+## the content of "cn" may have <sep> elements in it
+sep = element sep {empty}
+cn.content |= (sep|text|Glyph-alignmark)*
+cn.type.vals |= "e-notation"|"rational"|
+                 "complex-cartesian"|"complex-polar"|"constant" 
+
+## allow degree in bvar
+degree = element degree {MathML.Common.attrib,ContExp}
+logbase = element logbase {MathML.Common.attrib,ContExp}
+momentabout = element momentabout {MathML.Common.attrib,ContExp}
+bvar-head |= (degree?,ci)|(ci,degree?)
+
+## allow degree to modify <root/>
+apply.content |= root_arith1_elt,degree,ContExp*
+apply.content |= moment_s_data1_elt,(degree? & momentabout?),ContInPres*
+apply.content |= log_transc1_elt,logbase,ContExp*
+
+##allow apply to act as a binder
+apply.content |= bind.content
+
+domainofapplication = element domainofapplication {
+                   Definition.attrib,MathML.Common.attrib,cdbase.attrib?,ContExp}
+
+lowlimit = element lowlimit {
+           Definition.attrib,MathML.Common.attrib,cdbase.attrib?,ContExp+}
+uplimit = element uplimit {
+          Definition.attrib,MathML.Common.attrib,cdbase.attrib?,ContExp+}
+
+condition = element condition {Definition.attrib,cdbase.attrib?,ContExp}
+
+## allow the non-strict qualifiers
+qualifier |= domainofapplication|(uplimit,lowlimit?)|
+             (lowlimit,uplimit?)|degree|condition
+
+## we collect the operator elements by role
+opel.constant = notAllowed
+opel.binder = notAllowed
+opel.application = notAllowed
+opel.semantic-attribution = notAllowed
+opel.attribution = notAllowed
+opel.error = notAllowed
+
+opels = opel.constant | opel.binder | opel.application | 
+        opel.semantic-attribution | opel.attribution |
+	opel.error
+container = notAllowed
+
+## the values of the MathML type attributes;  
+MathMLType |= "real" | "complex" | "function" | "algebraic" | "integer"
+
+
+## we instantiate the strict content model by structure checking
+apply-binder-head = semantics-apply-binder|opel.binder
+apply.content |= apply-binder-head,bvar*,qualifier?,ContExp*
+semantics-apply-binder = element semantics {
+                       semantics.attribs,apply-binder-head, semantics-annotation*}
+
+apply-head |= opel.application
+bind-head |= opel.binder
+cerror-head |= opel.error
+
+## allow all functions, constants, and containers
+## to be content expressions on their own
+ContExp |= opel.constant|opel.application|container 
+
+
+# allow no body
+bind.content |= bind-head,bvar*,qualifier?
+
+# not sure what a sequence of things is supposed to map to in strict/OM
+# but is definitely allowed in pragmatic
+# see Content/SequencesAndSeries/product/rec-product3
+math.content |= ContExp*
+
+opel.content |= PresExp|Glyph-alignmark

Added: incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rng
URL: http://svn.apache.org/viewvc/incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rng?rev=1172466&view=auto
==============================================================================
--- incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rng (added)
+++ incubator/odf/trunk/validator/src/main/resources/schema/mathml3.0/mathml3-pragmatic.rng Mon Sep 19 05:43:23 2011
@@ -0,0 +1,290 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+      This is the Mathematical Markup Language (MathML) 3.0, an XML
+      application for describing mathematical notation and capturing
+      both its structure and content.
+  
+      Copyright 1998-2008 W3C (MIT, ERCIM, Keio)
+  
+      Use and distribution of this code are permitted under the terms
+      W3C Software Notice and License
+      http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+  
+  
+      Revision:   $Id: mathml3-pragmatic.rng,v 1.3 2008/11/15 22:00:48 dcarlis Exp $
+  
+     Update to MathML3 and Relax NG: David Carlisle and Michael Kohlhase
+  
+      This is the RelaxNG schema module for the pragmatic content part of 
+      MathML (but without the presentation in token elements).
+-->
+<grammar ns="http://www.w3.org/1998/Math/MathML" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0">
+  <define name="sep">
+    <a:documentation>the content of "cn" may have &lt;sep&gt; elements in it</a:documentation>
+    <element name="sep">
+      <empty/>
+    </element>
+  </define>
+  <define name="cn.content" combine="choice">
+    <zeroOrMore>
+      <choice>
+        <ref name="sep"/>
+        <text/>
+        <ref name="Glyph-alignmark"/>
+      </choice>
+    </zeroOrMore>
+  </define>
+  <define name="cn.type.vals" combine="choice">
+    <choice>
+      <value>e-notation</value>
+      <value>rational</value>
+      <value>complex-cartesian</value>
+      <value>complex-polar</value>
+      <value>constant</value>
+    </choice>
+  </define>
+  <define name="degree">
+    <a:documentation>allow degree in bvar</a:documentation>
+    <element name="degree">
+      <ref name="MathML.Common.attrib"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="logbase">
+    <element name="logbase">
+      <ref name="MathML.Common.attrib"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="momentabout">
+    <element name="momentabout">
+      <ref name="MathML.Common.attrib"/>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="bvar-head" combine="choice">
+    <choice>
+      <group>
+        <optional>
+          <ref name="degree"/>
+        </optional>
+        <ref name="ci"/>
+      </group>
+      <group>
+        <ref name="ci"/>
+        <optional>
+          <ref name="degree"/>
+        </optional>
+      </group>
+    </choice>
+  </define>
+  <define name="apply.content" combine="choice">
+    <a:documentation>allow degree to modify &lt;root/&gt;</a:documentation>
+    <ref name="root_arith1_elt"/>
+    <ref name="degree"/>
+    <zeroOrMore>
+      <ref name="ContExp"/>
+    </zeroOrMore>
+  </define>
+  <define name="apply.content" combine="choice">
+    <ref name="moment_s_data1_elt"/>
+    <interleave>
+      <optional>
+        <ref name="degree"/>
+      </optional>
+      <optional>
+        <ref name="momentabout"/>
+      </optional>
+    </interleave>
+    <zeroOrMore>
+      <ref name="ContInPres"/>
+    </zeroOrMore>
+  </define>
+  <define name="apply.content" combine="choice">
+    <ref name="log_transc1_elt"/>
+    <ref name="logbase"/>
+    <zeroOrMore>
+      <ref name="ContExp"/>
+    </zeroOrMore>
+  </define>
+  <define name="apply.content" combine="choice">
+    <a:documentation>allow apply to act as a binder</a:documentation>
+    <ref name="bind.content"/>
+  </define>
+  <define name="domainofapplication">
+    <element name="domainofapplication">
+      <ref name="Definition.attrib"/>
+      <ref name="MathML.Common.attrib"/>
+      <optional>
+        <ref name="cdbase.attrib"/>
+      </optional>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="lowlimit">
+    <element name="lowlimit">
+      <ref name="Definition.attrib"/>
+      <ref name="MathML.Common.attrib"/>
+      <optional>
+        <ref name="cdbase.attrib"/>
+      </optional>
+      <oneOrMore>
+        <ref name="ContExp"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="uplimit">
+    <element name="uplimit">
+      <ref name="Definition.attrib"/>
+      <ref name="MathML.Common.attrib"/>
+      <optional>
+        <ref name="cdbase.attrib"/>
+      </optional>
+      <oneOrMore>
+        <ref name="ContExp"/>
+      </oneOrMore>
+    </element>
+  </define>
+  <define name="condition">
+    <element name="condition">
+      <ref name="Definition.attrib"/>
+      <optional>
+        <ref name="cdbase.attrib"/>
+      </optional>
+      <ref name="ContExp"/>
+    </element>
+  </define>
+  <define name="qualifier" combine="choice">
+    <a:documentation>allow the non-strict qualifiers</a:documentation>
+    <choice>
+      <ref name="domainofapplication"/>
+      <group>
+        <ref name="uplimit"/>
+        <optional>
+          <ref name="lowlimit"/>
+        </optional>
+      </group>
+      <group>
+        <ref name="lowlimit"/>
+        <optional>
+          <ref name="uplimit"/>
+        </optional>
+      </group>
+      <ref name="degree"/>
+      <ref name="condition"/>
+    </choice>
+  </define>
+  <define name="opel.constant">
+    <a:documentation>we collect the operator elements by role</a:documentation>
+    <notAllowed/>
+  </define>
+  <define name="opel.binder">
+    <notAllowed/>
+  </define>
+  <define name="opel.application">
+    <notAllowed/>
+  </define>
+  <define name="opel.semantic-attribution">
+    <notAllowed/>
+  </define>
+  <define name="opel.attribution">
+    <notAllowed/>
+  </define>
+  <define name="opel.error">
+    <notAllowed/>
+  </define>
+  <define name="opels">
+    <choice>
+      <ref name="opel.constant"/>
+      <ref name="opel.binder"/>
+      <ref name="opel.application"/>
+      <ref name="opel.semantic-attribution"/>
+      <ref name="opel.attribution"/>
+      <ref name="opel.error"/>
+    </choice>
+  </define>
+  <define name="container">
+    <notAllowed/>
+  </define>
+  <define name="MathMLType" combine="choice">
+    <a:documentation>the values of the MathML type attributes;  </a:documentation>
+    <choice>
+      <value>real</value>
+      <value>complex</value>
+      <value>function</value>
+      <value>algebraic</value>
+      <value>integer</value>
+    </choice>
+  </define>
+  <define name="apply-binder-head">
+    <a:documentation>we instantiate the strict content model by structure checking</a:documentation>
+    <choice>
+      <ref name="semantics-apply-binder"/>
+      <ref name="opel.binder"/>
+    </choice>
+  </define>
+  <define name="apply.content" combine="choice">
+    <ref name="apply-binder-head"/>
+    <zeroOrMore>
+      <ref name="bvar"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="qualifier"/>
+    </optional>
+    <zeroOrMore>
+      <ref name="ContExp"/>
+    </zeroOrMore>
+  </define>
+  <define name="semantics-apply-binder">
+    <element name="semantics">
+      <ref name="semantics.attribs"/>
+      <ref name="apply-binder-head"/>
+      <zeroOrMore>
+        <ref name="semantics-annotation"/>
+      </zeroOrMore>
+    </element>
+  </define>
+  <define name="apply-head" combine="choice">
+    <ref name="opel.application"/>
+  </define>
+  <define name="bind-head" combine="choice">
+    <ref name="opel.binder"/>
+  </define>
+  <define name="cerror-head" combine="choice">
+    <ref name="opel.error"/>
+  </define>
+  <define name="ContExp" combine="choice">
+    <a:documentation>allow all functions, constants, and containers to be content expressions on their own</a:documentation>
+    <choice>
+      <ref name="opel.constant"/>
+      <ref name="opel.application"/>
+      <ref name="container"/>
+    </choice>
+  </define>
+  <!-- allow no body -->
+  <define name="bind.content" combine="choice">
+    <ref name="bind-head"/>
+    <zeroOrMore>
+      <ref name="bvar"/>
+    </zeroOrMore>
+    <optional>
+      <ref name="qualifier"/>
+    </optional>
+  </define>
+  <!--
+    not sure what a sequence of things is supposed to map to in strict/OM
+    but is definitely allowed in pragmatic
+    see Content/SequencesAndSeries/product/rec-product3
+  -->
+  <define name="math.content" combine="choice">
+    <zeroOrMore>
+      <ref name="ContExp"/>
+    </zeroOrMore>
+  </define>
+  <define name="opel.content" combine="choice">
+    <choice>
+      <ref name="PresExp"/>
+      <ref name="Glyph-alignmark"/>
+    </choice>
+  </define>
+</grammar>



Mime
View raw message