Skip to content

Commit

Permalink
Upgrade to mathml3 (#207)
Browse files Browse the repository at this point in the history
* update to MathML 3 schema

* patched mathml.xsd and patch file

* Regenerate mathml.xsd

This time I used a newer version of jing and trang.

There are some new groups

Reading about these, it seems like they are a catch-all used to make validation ignore unrecognized elements

The annotation-xml mathml element supports html which likely explains why these are added

* Remove option 'false' from document 'noindex' attribute

---------

Co-authored-by: philschatz <[email protected]>
  • Loading branch information
TylerZeroMaster and philschatz authored Jul 16, 2024
1 parent dbc0fb5 commit b8abe80
Show file tree
Hide file tree
Showing 15 changed files with 35,262 additions and 14,523 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ node_modules/
/server/dist/

# These are here for the testbook
/.xsd/
/.xsd/

/client/static/xsd/*.xsd.orig
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ The CNXML schema validation in the extension is performed using XSD files genera

```bash
$ git -C ../cnxml checkout poet-schema
$ java -jar ../jing-trang/build/jing.jar -s ../cnxml/cnxml/xml/poet/schema/rng/poet-jing.rng > poet-simplified.rng
$ java -jar ../jing-trang/build/jing.jar -i -s ../cnxml/cnxml/xml/poet/schema/rng/poet-jing.rng > poet-simplified.rng
$ java -jar ../jing-trang/build/trang.jar -I rng -O xsd poet-simplified.rng client/static/xsd/mathml.xsd
$ patch -p1 < client/static/xsd/trang.patch
$ rm poet-simplified.rng
Expand Down
3 changes: 1 addition & 2 deletions client/static/xsd/cmlnle.xsd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://katalysteducation.org/cmlnle/1.0" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://katalysteducation.org/cmlnle/1.0" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:import namespace="http://bibtexml.sf.net/" schemaLocation="ns2.xsd"/>
<xs:import namespace="http://cnx.rice.edu/cnxml" schemaLocation="cnxml.xsd"/>
<xs:import namespace="http://cnx.rice.edu/collxml" schemaLocation="collxml.xsd"/>
Expand All @@ -8,7 +8,6 @@
<xs:import namespace="http://cnx.rice.edu/system-info" schemaLocation="s.xsd"/>
<xs:import namespace="http://katalysteducation.org/cxlxt/1.0" schemaLocation="cxlxt.xsd"/>
<xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="mathml.xsd"/>
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="ns1.xsd"/>
<xs:attribute name="case"/>
Expand Down
24 changes: 11 additions & 13 deletions client/static/xsd/cnxml.xsd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://cnx.rice.edu/cnxml" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://cnx.rice.edu/cnxml" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:import namespace="http://bibtexml.sf.net/" schemaLocation="ns2.xsd"/>
<xs:import namespace="http://cnx.rice.edu/collxml" schemaLocation="collxml.xsd"/>
<xs:import namespace="http://cnx.rice.edu/mdml" schemaLocation="mdml.xsd"/>
Expand All @@ -8,7 +8,6 @@
<xs:import namespace="http://katalysteducation.org/cmlnle/1.0" schemaLocation="cmlnle.xsd"/>
<xs:import namespace="http://katalysteducation.org/cxlxt/1.0" schemaLocation="cxlxt.xsd"/>
<xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="mathml.xsd"/>
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="ns1.xsd"/>
<xs:element name="document">
Expand Down Expand Up @@ -45,7 +44,6 @@
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand Down Expand Up @@ -5207,7 +5205,7 @@
<xs:group minOccurs="0" ref="mathml:longdesc_2"/>
<xs:choice>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand All @@ -5219,7 +5217,7 @@
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6209,7 +6207,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6279,7 +6277,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6351,7 +6349,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6454,7 +6452,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6557,7 +6555,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6631,7 +6629,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6746,7 +6744,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down Expand Up @@ -6906,7 +6904,7 @@
<xs:group ref="mathml:note_2"/>
<xs:group ref="mathml:list_5"/>
<xs:group ref="mathml:object_2"/>
<xs:group ref="mathml:image_3"/>
<xs:group ref="mathml:image_4"/>
<xs:group ref="mathml:audio_2"/>
<xs:group ref="mathml:video_2"/>
<xs:group ref="mathml:java-applet_2"/>
Expand Down
3 changes: 1 addition & 2 deletions client/static/xsd/collxml.xsd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://cnx.rice.edu/collxml" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://cnx.rice.edu/collxml" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:import namespace="http://bibtexml.sf.net/" schemaLocation="ns2.xsd"/>
<xs:import namespace="http://cnx.rice.edu/cnxml" schemaLocation="cnxml.xsd"/>
<xs:import namespace="http://cnx.rice.edu/mdml" schemaLocation="mdml.xsd"/>
Expand All @@ -8,7 +8,6 @@
<xs:import namespace="http://katalysteducation.org/cmlnle/1.0" schemaLocation="cmlnle.xsd"/>
<xs:import namespace="http://katalysteducation.org/cxlxt/1.0" schemaLocation="cxlxt.xsd"/>
<xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="mathml.xsd"/>
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="ns1.xsd"/>
<xs:element name="collection">
Expand Down
3 changes: 1 addition & 2 deletions client/static/xsd/cxlxt.xsd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://katalysteducation.org/cxlxt/1.0" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://katalysteducation.org/cxlxt/1.0" xmlns:cxlxt="http://katalysteducation.org/cxlxt/1.0" xmlns:collxml="http://cnx.rice.edu/collxml" xmlns:s="http://cnx.rice.edu/system-info" xmlns:cnxml="http://cnx.rice.edu/cnxml" xmlns:ns1="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:cmlnle="http://katalysteducation.org/cmlnle/1.0" xmlns:ns2="http://bibtexml.sf.net/" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:qml="http://cnx.rice.edu/qml/1.0" xmlns:mdml="http://cnx.rice.edu/mdml">
<xs:import namespace="http://bibtexml.sf.net/" schemaLocation="ns2.xsd"/>
<xs:import namespace="http://cnx.rice.edu/cnxml" schemaLocation="cnxml.xsd"/>
<xs:import namespace="http://cnx.rice.edu/collxml" schemaLocation="collxml.xsd"/>
Expand All @@ -8,7 +8,6 @@
<xs:import namespace="http://cnx.rice.edu/system-info" schemaLocation="s.xsd"/>
<xs:import namespace="http://katalysteducation.org/cmlnle/1.0" schemaLocation="cmlnle.xsd"/>
<xs:import namespace="http://www.w3.org/1998/Math/MathML" schemaLocation="mathml.xsd"/>
<xs:import namespace="http://www.w3.org/1999/xlink" schemaLocation="xlink.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:import namespace="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" schemaLocation="ns1.xsd"/>
<xs:attribute name="born"/>
Expand Down
Loading

0 comments on commit b8abe80

Please sign in to comment.