-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cellml): add validation for cellML 1.1
- Loading branch information
1 parent
9355bad
commit 8c450e4
Showing
34 changed files
with
4,027 additions
and
17 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
409 changes: 409 additions & 0 deletions
409
biosimulators_utils/model_lang/cellml/cellml_1_1_original.xsd
Large diffs are not rendered by default.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
biosimulators_utils/model_lang/cellml/common/common-attribs.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?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é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 û 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/. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<?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é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> | ||
<!-- *** This region was not commented out in the original W3C version, | ||
but has been commented out as the mathml:math element in | ||
CellML does not allow presentation MathML elements. | ||
<xs:group ref="PresExpr.class"/> | ||
*** End of region commented out for CellML *** --> | ||
<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 û 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/. | ||
--> |
20 changes: 20 additions & 0 deletions
20
biosimulators_utils/model_lang/cellml/common/xlink-href.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<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 û 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/. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
<?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é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 û 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/. | ||
--> |
Oops, something went wrong.