summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng')
-rw-r--r--Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng229
1 files changed, 229 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng
new file mode 100644
index 00000000000..5fe330eb6bb
--- /dev/null
+++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module ADT
+ $Id: omdocadt.rnc 8959 2011-09-02 06:01:43Z kohlhase $
+ $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocadt.rnc $
+ See the documentation and examples at http://www.omdoc.org
+ Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL)
+-->
+<grammar ns="http://omdoc.org/ns" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+ <define name="omdoc.class" combine="interleave">
+ <zeroOrMore>
+ <ref name="adt"/>
+ </zeroOrMore>
+ </define>
+ <define name="adt.sym.attrib">
+ <ref name="id.attribs"/>
+ <ref name="scope.attrib"/>
+ <attribute name="name">
+ <data type="NCName"/>
+ </attribute>
+ </define>
+ <!--
+ adts are abstract data types, they are short forms for groups of symbols
+ and their definitions, therefore, they have much the same attributes.
+ -->
+ <define name="adt.attribs">
+ <interleave>
+ <ref name="toplevel.attribs"/>
+ <optional>
+ <attribute name="parameters">
+ <list>
+ <zeroOrMore>
+ <data type="NCName"/>
+ </zeroOrMore>
+ </list>
+ </attribute>
+ </optional>
+ </interleave>
+ </define>
+ <define name="adt.class">
+ <oneOrMore>
+ <ref name="sortdef"/>
+ </oneOrMore>
+ </define>
+ <define name="adt.model">
+ <interleave>
+ <ref name="metadata.class"/>
+ <ref name="adt.class"/>
+ </interleave>
+ </define>
+ <define name="adt">
+ <element name="adt">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="adt.attribs"/>
+ <ref name="adt.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+ <define name="adttype">
+ <choice>
+ <value>loose</value>
+ <value>generated</value>
+ <value>free</value>
+ </choice>
+ </define>
+ <define name="sortdef.attribs">
+ <interleave>
+ <ref name="adt.sym.attrib"/>
+ <optional>
+ <attribute name="role">
+ <value>sort</value>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="type">
+ <ref name="adttype"/>
+ </attribute>
+ </optional>
+ </interleave>
+ </define>
+ <define name="sortdef.model">
+ <interleave>
+ <ref name="metadata.class"/>
+ <zeroOrMore>
+ <ref name="constructor"/>
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="insort"/>
+ </zeroOrMore>
+ <optional>
+ <ref name="recognizer"/>
+ </optional>
+ </interleave>
+ </define>
+ <define name="sortdef">
+ <element name="sortdef">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="sortdef.attribs"/>
+ <ref name="sortdef.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+ <define name="insort.attribs">
+ <attribute name="for">
+ <ref name="omdocref"/>
+ </attribute>
+ </define>
+ <define name="insort.model">
+ <empty/>
+ </define>
+ <define name="insort">
+ <element name="insort">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="insort.attribs"/>
+ <ref name="insort.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+ <define name="constructor.attribs">
+ <interleave>
+ <ref name="adt.sym.attrib"/>
+ <optional>
+ <ref name="sym.role.attrib"/>
+ </optional>
+ </interleave>
+ </define>
+ <define name="constructor.model">
+ <interleave>
+ <ref name="metadata.class"/>
+ <zeroOrMore>
+ <ref name="argument"/>
+ </zeroOrMore>
+ </interleave>
+ </define>
+ <define name="constructor">
+ <element name="constructor">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="constructor.attribs"/>
+ <ref name="constructor.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+ <define name="recognizer.attribs">
+ <interleave>
+ <ref name="adt.sym.attrib"/>
+ <optional>
+ <ref name="sym.role.attrib"/>
+ </optional>
+ </interleave>
+ </define>
+ <define name="recognizer.model">
+ <ref name="metadata.class"/>
+ </define>
+ <define name="recognizer">
+ <element name="recognizer">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="recognizer.attribs"/>
+ <ref name="recognizer.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+ <define name="argument.attribs">
+ <empty/>
+ </define>
+ <define name="argument.model">
+ <interleave>
+ <ref name="type"/>
+ <optional>
+ <ref name="selector"/>
+ </optional>
+ </interleave>
+ </define>
+ <define name="argument">
+ <element name="argument">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="argument.attribs"/>
+ <ref name="argument.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+ <define name="selector.attribs">
+ <interleave>
+ <ref name="adt.sym.attrib"/>
+ <optional>
+ <ref name="sym.role.attrib"/>
+ </optional>
+ <optional>
+ <attribute name="total">
+ <choice>
+ <value>yes</value>
+ <value>no</value>
+ </choice>
+ </attribute>
+ </optional>
+ </interleave>
+ </define>
+ <define name="selector.model">
+ <ref name="metadata.class"/>
+ </define>
+ <define name="selector">
+ <element name="selector">
+ <choice>
+ <ref name="tref"/>
+ <interleave>
+ <ref name="selector.attribs"/>
+ <ref name="selector.model"/>
+ </interleave>
+ </choice>
+ </element>
+ </define>
+</grammar>