summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rng/omdocmobj.rng
blob: de29149f94e62422c3ac25d1e37c2587ace8c6d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0" encoding="UTF-8"?>
<!--
  A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module MOBJ  
  $Id: omdocmobj.rnc 8973 2011-09-09 12:45:16Z kohlhase $
  $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocmobj.rnc $
  See the documentation and examples at http://www.omdoc.org
  Copyright (c) 2004-2009 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">
  <!-- the legacy element, it can encapsulate the non-migrated formats -->
  <define name="legacy.attribs">
    <interleave>
      <ref name="id.attribs"/>
      <optional>
        <attribute name="formalism">
          <data type="anyURI"/>
        </attribute>
      </optional>
      <attribute name="format">
        <data type="anyURI"/>
      </attribute>
    </interleave>
  </define>
  <define name="legacy.model">
    <ref name="Anything"/>
  </define>
  <define name="legacy">
    <element name="legacy">
      <choice>
        <ref name="tref"/>
        <interleave>
          <ref name="legacy.attribs"/>
          <ref name="legacy.model"/>
        </interleave>
      </choice>
    </element>
  </define>
  <define name="nonom.attribs">
    <zeroOrMore>
      <attribute>
        <anyName>
          <except>
            <nsName ns=""/>
            <nsName ns="http://www.openmath.org/OpenMath"/>
          </except>
        </anyName>
      </attribute>
    </zeroOrMore>
  </define>
  <define name="extom.attribs">
    <interleave>
      <ref name="idrest.attribs"/>
      <ref name="nonom.attribs"/>
    </interleave>
  </define>
  <define name="omobj">
    <grammar>
      <include href="openmath2.rng"/>
      <define name="common.attributes" combine="interleave">
        <parentRef name="extom.attribs"/>
      </define>
    </grammar>
  </define>
  <define name="cmml">
    <grammar>
      <include href="mathml3-common.rng"/>
      <include href="mathml3-strict-content.rng"/>
    </grammar>
  </define>
  <define name="mobj">
    <choice>
      <ref name="legacy"/>
      <ref name="omobj"/>
      <ref name="cmml"/>
    </choice>
  </define>
</grammar>