<grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.w3.org/1998/Math/MathML" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> <include href="mathml3-common.rng"/> <define name="math.content" combine="choice"> <ref name="ContExp"/> </define> <define name="opel.content"> <text/> </define> <define name="cn.content"> <choice> <text/> <group> <ref name="cn"/> <ref name="cn"/> </group> </choice> </define> <define name="cn.type.vals"> <choice> <value>integer</value> <value>real</value> <value>double</value> </choice> </define> <define name="cn"> <element name="cn"> <optional> <attribute name="base"/> </optional> <optional> <attribute name="type"> <ref name="cn.type.vals"/> </attribute> </optional> <ref name="Definition.attrib"/> <ref name="MathML.Common.attrib"/> <zeroOrMore> <ref name="cn.content"/> </zeroOrMore> </element> </define> <define name="ci"> <element name="ci"> <optional> <attribute name="type"> <data type="string"/> </attribute> </optional> <optional> <attribute name="nargs"> <data type="string"/> </attribute> </optional> <optional> <attribute name="occurrence"> <data type="string"/> </attribute> </optional> <ref name="Definition.attrib"/> <ref name="MathML.Common.attrib"/> <ref name="opel.content"/> <optional> <ref name="name.attrib"/> </optional> </element> </define> <define name="cdname.attrib"> <attribute name="cd"> <data type="NCName"/> </attribute> </define> <define name="csymbol"> <element name="csymbol"> <ref name="MathML.Common.attrib"/> <ref name="Definition.attrib"/> <optional> <ref name="cdname.attrib"/> </optional> <optional> <ref name="cdbase.attrib"/> </optional> <ref name="opel.content"/> </element> </define> <define name="apply"> <element name="apply"> <ref name="MathML.Common.attrib"/> <optional> <ref name="cdbase.attrib"/> </optional> <ref name="apply.content"/> </element> </define> <define name="apply-head"> <choice> <ref name="apply"/> <ref name="bind"/> <ref name="ci"/> <ref name="csymbol"/> <ref name="semantics-apply"/> </choice> </define> <define name="apply.content"> <ref name="apply-head"/> <zeroOrMore> <ref name="ContExp"/> </zeroOrMore> </define> <define name="semantics-apply"> <element name="semantics"> <ref name="semantics.attribs"/> <ref name="apply-head"/> <zeroOrMore> <ref name="semantics-annotation"/> </zeroOrMore> </element> </define> <define name="qualifier"> <notAllowed/> </define> <define name="bind"> <element name="bind"> <ref name="MathML.Common.attrib"/> <optional> <ref name="cdbase.attrib"/> </optional> <ref name="bind.content"/> </element> </define> <define name="bind-head"> <choice> <ref name="apply"/> <ref name="csymbol"/> <ref name="semantics-bind"/> </choice> </define> <define name="bind.content"> <ref name="bind-head"/> <zeroOrMore> <ref name="bvar"/> </zeroOrMore> <optional> <ref name="qualifier"/> </optional> <ref name="ContExp"/> </define> <define name="semantics-bind"> <element name="semantics"> <ref name="semantics.attribs"/> <ref name="bind-head"/> <zeroOrMore> <ref name="semantics-annotation"/> </zeroOrMore> </element> </define> <define name="bvar"> <element name="bvar"> <ref name="MathML.Common.attrib"/> <optional> <ref name="cdbase.attrib"/> </optional> <ref name="bvar-head"/> </element> </define> <define name="bvar-head"> <choice> <ref name="ci"/> <ref name="semantics-bvar"/> </choice> </define> <define name="semantics-bvar"> <element name="semantics"> <ref name="semantics.attribs"/> <ref name="bvar-head"/> <zeroOrMore> <ref name="semantics-annotation"/> </zeroOrMore> </element> </define> <define name="share"> <element name="share"> <ref name="MathML.Common.attrib"/> <attribute name="href"> <data type="anyURI"/> </attribute> </element> </define> <define name="cerror"> <element name="cerror"> <ref name="MathML.Common.attrib"/> <optional> <ref name="cdbase.attrib"/> </optional> <ref name="cerror.content"/> </element> </define> <define name="cerror-head"> <choice> <ref name="csymbol"/> <ref name="apply"/> <ref name="semantics-cerror"/> </choice> </define> <define name="cerror.content"> <ref name="cerror-head"/> <zeroOrMore> <ref name="ContExp"/> </zeroOrMore> </define> <define name="semantics-cerror"> <element name="semantics"> <ref name="semantics.attribs"/> <ref name="cerror-head"/> <zeroOrMore> <ref name="semantics-annotation"/> </zeroOrMore> </element> </define> <define name="semantics-cmml"> <element name="semantics"> <ref name="semantics.attribs"/> <ref name="ContExp"/> <zeroOrMore> <ref name="semantics-annotation"/> </zeroOrMore> </element> </define> <define name="ContExp"> <choice> <ref name="cn"/> <ref name="ci"/> <ref name="csymbol"/> <ref name="apply"/> <ref name="bind"/> <ref name="share"/> <ref name="cerror"/> <ref name="semantics-cmml"/> </choice> </define> </grammar>