Kaydet (Commit) a09ed710 authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Thorsten Behrens

schema: add MathML2 XSD

These are needed to invoke the ODF validator with custom ODF schemas.

Change-Id: I231b5d8a8573e9ac6171a331362a31aceae08d80
Reviewed-on: https://gerrit.libreoffice.org/56399
Tested-by: Jenkins
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst b88706f9
Copyright © 2015 W3C® (MIT, ERCIM, Keio, Beihang). This software or document includes material copied from or derived from Mathematical Markup Language (MathML) Version 2.0 https://www.w3.org/TR/MathML2/ https://www.w3.org/Math/XMLSchema/mathml2.tgz
STATUS: W3C Recommendation
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
xmlns:xlink="http://www.w3.org/1999/xlink"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is the common attributes module for MathML.
Author: St&#233;phane Dalmas, INRIA.
</xs:documentation>
</xs:annotation>
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink-href.xsd"/>
<xs:import/> <!-- import any foreign namespace -->
<!-- The type of "class" is from the XHTML modularization with Schema
document -->
<xs:attributeGroup name="Common.attrib">
<xs:attribute name="class" type="xs:NMTOKENS"/>
<xs:attribute name="style" type="xs:string"/>
<xs:attribute name="xref" type="xs:IDREF"/>
<xs:attribute name="id" type="xs:ID"/>
<xs:attribute ref="xlink:href"/>
<!-- allow attributes from foreign namespaces, and don't check them -->
<xs:anyAttribute namespace="##other" processContents="skip"/>
</xs:attributeGroup>
</xs:schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is an XML Schema module defining the "math" element of MathML.
Author: St&#233;phane Dalmas, INRIA.
</xs:documentation>
</xs:annotation>
<!-- The four groups that govern a lot of things -->
<!-- currently very lax. Should be tightened from Chapter 5 -->
<xs:group name="Presentation-expr.class">
<xs:choice>
<xs:group ref="PresExpr.class"/>
<xs:group ref="ContExpr.class"/>
</xs:choice>
</xs:group>
<xs:group name="Content-expr.class">
<xs:choice>
<xs:group ref="ContExpr.class"/>
<xs:group ref="PresExpr.class"/>
</xs:choice>
</xs:group>
<xs:group name="PresExpr.class">
<xs:choice>
<xs:group ref="Presentation-token.class"/>
<xs:group ref="Presentation-layout.class"/>
<xs:group ref="Presentation-script.class"/>
<xs:group ref="Presentation-table.class"/>
<xs:element ref="mspace"/>
<xs:element ref="maction"/>
<xs:element ref="merror"/>
<xs:element ref="mstyle"/>
</xs:choice>
</xs:group>
<xs:group name="ContExpr.class">
<xs:choice>
<xs:group ref="Content-tokens.class"/>
<xs:group ref="Content-arith.class"/>
<xs:group ref="Content-functions.class"/>
<xs:group ref="Content-logic.class"/>
<xs:group ref="Content-constants.class"/>
<xs:group ref="Content-sets.class"/>
<xs:group ref="Content-relations.class"/>
<xs:group ref="Content-elementary-functions.class"/>
<xs:group ref="Content-calculus.class"/>
<xs:group ref="Content-linear-algebra.class"/>
<xs:group ref="Content-vector-calculus.class"/>
<xs:group ref="Content-statistics.class"/>
<xs:group ref="Content-constructs.class"/>
<xs:element ref="semantics"/>
</xs:choice>
</xs:group>
<!-- "math" -->
<xs:attributeGroup name="Browser-interface.attrib">
<xs:attribute name="baseline" type="xs:string"/>
<xs:attribute name="overflow" default="scroll">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="scroll"/>
<xs:enumeration value="elide"/>
<xs:enumeration value="truncate"/>
<xs:enumeration value="scale"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="altimg" type="xs:anyURI"/>
<xs:attribute name="alttext" type="xs:string"/>
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="height" type="xs:string"/>
<xs:attribute name="width" type="xs:string"/>
</xs:attributeGroup>
<xs:attributeGroup name="math.attlist">
<xs:attributeGroup ref="Browser-interface.attrib"/>
<xs:attribute name="macros" type="xs:string"/>
<!-- deprecated
<xs:attribute name="mode" type="xs:string"/>
-->
<xs:attribute name="display" default="inline">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="block"/>
<xs:enumeration value="inline"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:group name="math.content">
<xs:choice>
<xs:group ref="PresExpr.class"/>
<xs:group ref="ContExpr.class"/>
</xs:choice>
</xs:group>
<xs:complexType name="math.type">
<xs:group ref="math.content" minOccurs="0" maxOccurs="unbounded"/>
<xs:attributeGroup ref="math.attlist"/>
</xs:complexType>
<xs:element name="math" type="math.type"/>
</xs:schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<schema targetNamespace="http://www.w3.org/1999/xlink"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<documentation xml:lang="en">
This schema provides the XLink href attribute for use in the MathML2
schema. Written by Max Froumentin, W3C.
</documentation>
</annotation>
<attribute name="href" type="anyURI"/>
</schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is an XML Schema module for the "arithmetic" operators of content
MathML.
Author: St&#233;phane Dalmas, INRIA.
</xs:documentation>
</xs:annotation>
<!-- a common type for all this -->
<xs:complexType name="Arith.type">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:complexType>
<!-- The elements -->
<xs:element name="abs" type="Arith.type"/>
<xs:element name="conjugate" type="Arith.type"/>
<xs:element name="arg" type="Arith.type"/>
<xs:element name="real" type="Arith.type"/>
<xs:element name="imaginary" type="Arith.type"/>
<xs:element name="floor" type="Arith.type"/>
<xs:element name="ceiling" type="Arith.type"/>
<xs:element name="power" type="Arith.type"/>
<xs:element name="root" type="Arith.type"/>
<xs:element name="minus" type="Arith.type"/>
<xs:element name="plus" type="Arith.type"/>
<xs:element name="sum" type="Arith.type"/>
<xs:element name="times" type="Arith.type"/>
<xs:element name="product" type="Arith.type"/>
<xs:element name="max" type="Arith.type"/>
<xs:element name="min" type="Arith.type"/>
<xs:element name="factorial" type="Arith.type"/>
<xs:element name="quotient" type="Arith.type"/>
<xs:element name="divide" type="Arith.type"/>
<xs:element name="rem" type="Arith.type"/>
<xs:element name="gcd" type="Arith.type"/>
<xs:element name="lcm" type="Arith.type"/>
<!-- And the group of everything -->
<xs:group name="Content-arith.class">
<xs:choice>
<xs:element ref="abs"/>
<xs:element ref="conjugate"/>
<xs:element ref="factorial"/>
<xs:element ref="arg"/>
<xs:element ref="real"/>
<xs:element ref="imaginary"/>
<xs:element ref="floor"/>
<xs:element ref="ceiling"/>
<xs:element ref="quotient"/>
<xs:element ref="divide"/>
<xs:element ref="rem"/>
<xs:element ref="minus"/>
<xs:element ref="plus"/>
<xs:element ref="times"/>
<xs:element ref="power"/>
<xs:element ref="root"/>
<xs:element ref="max"/>
<xs:element ref="min"/>
<xs:element ref="gcd"/>
<xs:element ref="lcm"/>
<xs:element ref="sum"/>
<xs:element ref="product"/>
</xs:choice>
</xs:group>
</xs:schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is an XML Schema module for the calculs operators of content
MathML.
Author: St&#233;phane Dalmas, INRIA.
</xs:documentation>
</xs:annotation>
<!-- "int" -->
<xs:attributeGroup name="int.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:complexType name="int.type">
<xs:attributeGroup ref="int.attlist"/>
</xs:complexType>
<xs:element name="int" type="int.type"/>
<!-- "diff" -->
<xs:attributeGroup name="diff.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:complexType name="diff.type">
<xs:attributeGroup ref="diff.attlist"/>
</xs:complexType>
<xs:element name="diff" type="diff.type"/>
<!-- "partialdiff" -->
<xs:attributeGroup name="partialdiff.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:complexType name="partialdiff.type">
<xs:attributeGroup ref="partialdiff.attlist"/>
</xs:complexType>
<xs:element name="partialdiff" type="partialdiff.type"/>
<!-- "limit" -->
<xs:attributeGroup name="limit.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:complexType name="limit.type">
<xs:attributeGroup ref="limit.attlist"/>
</xs:complexType>
<xs:element name="limit" type="limit.type"/>
<!-- "lowlimit" -->
<xs:attributeGroup name="lowlimit.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:group name="lowlimit.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="lowlimit.type">
<xs:group ref="lowlimit.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="lowlimit.attlist"/>
</xs:complexType>
<xs:element name="lowlimit" type="lowlimit.type"/>
<!-- "uplimit" -->
<xs:attributeGroup name="uplimit.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:group name="uplimit.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="uplimit.type">
<xs:group ref="uplimit.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="uplimit.attlist"/>
</xs:complexType>
<xs:element name="uplimit" type="uplimit.type"/>
<!-- "tendsto" -->
<xs:attributeGroup name="tendsto.attlist">
<xs:attribute name="type" type="xs:string"/>
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:complexType name="tendsto.type">
<xs:attributeGroup ref="tendsto.attlist"/>
</xs:complexType>
<xs:element name="tendsto" type="tendsto.type"/>
<!-- And the group of everything -->
<xs:group name="Content-calculus.class">
<xs:choice>
<xs:element ref="int"/>
<xs:element ref="diff"/>
<xs:element ref="partialdiff"/>
<xs:element ref="limit"/>
<xs:element ref="lowlimit"/>
<xs:element ref="uplimit"/>
<xs:element ref="tendsto"/>
</xs:choice>
</xs:group>
</xs:schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is the XML schema module defining common attributes for the
content part of MathML.
Authors: St&#233;phane Dalmas, INRIA.
</xs:documentation>
</xs:annotation>
<xs:attributeGroup name="Definition.attrib">
<xs:attribute name="encoding" type="xs:string"/>
<xs:attribute name="definitionURL" type="xs:anyURI"/>
</xs:attributeGroup>
</xs:schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is the XML Schema module for the basic constants of MathML content.
Author: St&#233;phane Dalmas.
</xs:documentation>
</xs:annotation>
<!-- a common type for all this -->
<xs:complexType name="Constant.type">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:complexType>
<!-- Basic sets -->
<xs:element name="naturalnumbers" type="Constant.type"/>
<xs:element name="primes" type="Constant.type"/>
<xs:element name="integers" type="Constant.type"/>
<xs:element name="rationals" type="Constant.type"/>
<xs:element name="reals" type="Constant.type"/>
<xs:element name="complexes" type="Constant.type"/>
<!-- Empty set -->
<xs:element name="emptyset" type="Constant.type"/>
<!-- Basic constants -->
<xs:element name="exponentiale" type="Constant.type"/>
<xs:element name="imaginaryi" type="Constant.type"/>
<xs:element name="pi" type="Constant.type"/>
<xs:element name="eulergamma" type="Constant.type"/>
<!-- Boolean constants -->
<xs:element name="true" type="Constant.type"/>
<xs:element name="false" type="Constant.type"/>
<!-- Infinty -->
<xs:element name="infinity" type="Constant.type"/>
<!-- NotANumber -->
<xs:element name="notanumber" type="Constant.type"/>
<!-- And the group of everything -->
<xs:group name="Content-constants.class">
<xs:choice>
<xs:element ref="naturalnumbers"/>
<xs:element ref="primes"/>
<xs:element ref="integers"/>
<xs:element ref="rationals"/>
<xs:element ref="reals"/>
<xs:element ref="complexes"/>
<xs:element ref="emptyset"/>
<xs:element ref="exponentiale"/>
<xs:element ref="imaginaryi"/>
<xs:element ref="pi"/>
<xs:element ref="eulergamma"/>
<xs:element ref="true"/>
<xs:element ref="false"/>
<xs:element ref="infinity"/>
<xs:element ref="notanumber"/>
</xs:choice>
</xs:group>
</xs:schema>
<!--
Copyright &#251; 2002 World Wide Web Consortium, (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved. See
http://www.w3.org/Consortium/Legal/.
-->
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
elementFormDefault="qualified"
>
<xs:annotation>
<xs:documentation>
This is an XML Schema module for the basic constructs of content MathML.
Author: St&#233;phane Dalmas, INRIA.
</xs:documentation>
</xs:annotation>
<!-- "apply" -->
<xs:attributeGroup name="apply.attlist">
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:group name="apply.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="apply.type">
<xs:group ref="apply.content" minOccurs="0" maxOccurs="unbounded"/>
<xs:attributeGroup ref="apply.attlist"/>
</xs:complexType>
<xs:element name="apply" type="apply.type"/>
<!-- "interval" -->
<xs:attributeGroup name="interval.attlist">
<xs:attribute name="closure" default="closed">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="closed"/>
<xs:enumeration value="open"/>
<xs:enumeration value="open-closed"/>
<xs:enumeration value="closed-open"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<!--
<xs:group name="interval.content">
<xs:choice>
<xs:group ref="Content-expr.class" minOccurs="2" maxOccurs="2"/>
<xs:element ref="condition"/>
</xs:choice>
</xs:group>
-->
<xs:complexType name="interval.type">
<!-- <xs:group ref="interval.content"/> -->
<xs:group ref="Content-expr.class" maxOccurs="2"/>
<xs:attributeGroup ref="interval.attlist"/>
</xs:complexType>
<xs:element name="interval" type="interval.type"/>
<!-- "inverse" -->
<xs:attributeGroup name="inverse.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:complexType name="inverse.type">
<xs:attributeGroup ref="inverse.attlist"/>
</xs:complexType>
<xs:element name="inverse" type="inverse.type"/>
<!-- "condition" -->
<xs:attributeGroup name="condition.attlist">
<xs:attributeGroup ref="Definition.attrib"/>
</xs:attributeGroup>
<xs:group name="condition.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="condition.type">
<xs:group ref="condition.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="condition.attlist"/>
</xs:complexType>
<xs:element name="condition" type="condition.type"/>
<!-- "declare" -->
<xs:attributeGroup name="declare.attlist">
<xs:attribute name="type" type="xs:string"/>
<xs:attribute name="scope" type="xs:string"/>
<xs:attribute name="nargs" type="xs:nonNegativeInteger"/>
<xs:attribute name="occurrence">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="prefix"/>
<xs:enumeration value="infix"/>
<xs:enumeration value="function-model"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="Definition.attrib"/>
</xs:attributeGroup>
<xs:group name="declare.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="declare.type">
<xs:group ref="declare.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="declare.attlist"/>
</xs:complexType>
<xs:element name="declare" type="declare.type"/>
<!-- "lambda" -->
<xs:attributeGroup name="lambda.attlist">
<xs:attributeGroup ref="Common.attrib"/>
</xs:attributeGroup>
<xs:group name="lambda.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="lambda.type">
<xs:group ref="lambda.content" minOccurs="1" maxOccurs="unbounded"/>
<xs:attributeGroup ref="lambda.attlist"/>
</xs:complexType>
<xs:element name="lambda" type="lambda.type"/>
<!-- "piecewise" and its inner elements -->
<xs:group name="otherwise.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="otherwise.type">
<xs:group ref="otherwise.content"/>
<xs:attributeGroup ref="Common.attrib"/>
</xs:complexType>
<xs:element name="otherwise" type="otherwise.type"/>
<xs:group name="piece.content">
<xs:sequence>
<xs:group ref="Content-expr.class"/>
</xs:sequence>
</xs:group>
<xs:complexType name="piece.type">
<xs:group ref="piece.content" minOccurs="1" maxOccurs="unbounded"/>
</xs:complexType>
<xs:element name="piece" type="piece.type"/>
<xs:attributeGroup name="piecewise.attlist">
<xs:attributeGroup ref="Common.attrib"/>