summaryrefslogtreecommitdiff
path: root/tex/context/modules/mkii/x-chemml.xsd
blob: b511219115c6d59940947ef31d49db6fd6fb4b7f (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:annotation>
  <xsd:documentation xml:lang="en">
    <p>This schema covers (basic presentational) Chemical
    markup. We will extend this schema with names and
    predefined components.</p> 
    <p>author: Hans Hagen, copyright: PRAGMA-ADE / Hasselt NL</p>  
  </xsd:documentation>
</xsd:annotation>

<xsd:element type="chemType"> 
  <xsd:sequence>
    <xsd:element ref="chemicalComponentType" />
    <xsd:choice>
      <xsd:element ref="chemicalActionType" />
      <xsd:element ref="chemicalBondType" />
    </xsd:choice>
  </xsd:sequence>
</xsd:element>

<xsd:element name="chem"  type="chemType" /> 
<xsd:element name="ichem" type="chemType" /> 
<xsd:element name="dchem" type="chemType" /> 

<xsd:element name="molecule"> 
  <xsd:complexType>
    <xsd:sequence>
      <xsd:choice>
        <xsd:element name="ion" />
        <xsd:element name="atom" />
      </xsd:choice>  
      <xsd:element name="caption" type="chemicalCaptionType" />
    </xsd:sequence>
    <xsd:attribute name="n" type="xsd:positiveInteger" /> 
  </xsd:complexType>
</xsd:element> 

<xsd:element name="ion"> 
  <xsd:complexType>
    <xsd:sequence>
      <xsd:element name="atom" />
    </xsd:sequence>
    <xsd:attribute name="n" type="xsd:positiveInteger" /> 
    <xsd:attribute name="charge" type="xsd:integer" /> 
  </xsd:complexType>
</xsd:element> 

<xsd:element name="atom" type="xsd:string"> 
  <xsd:complexType>
    <xsd:attribute name="n"       type="xsd:positiveInteger"/> 
    <xsd:attribute name="charge"  type="xsd:integer" /> 
    <xsd:attribute name="protons" type="xsd:positiveInteger" /> 
    <xsd:attribute name="weight"  type="xsd:positiveInteger" /> 
  </xsd:complexType>
</xsd:element> 

<xsd:complexType name="chemicalActionType">
  <xsd:choice>
    <xsd:element name="plus"        type="chemicalCaptionType" />
    <xsd:element name="minus"       type="chemicalCaptionType" />
    <xsd:element name="equal"       type="chemicalCaptionType" />
    <xsd:element name="gives"       type="chemicalCaptionType" />
    <xsd:element name="equilibrium" type="chemicalCaptionType" />
    <xsd:element name="mesomeric"   type="chemicalCaptionType" />
  </xsd:choice>
</xsd:complexType>

<xsd:complexType name="chemicalBondType">
  <xsd:choice>
    <xsd:element name="singlebond" />
    <xsd:element name="doublebond" />
    <xsd:element name="triplebond" />
  </xsd:choice>
</xsd:complexType>

<xsd:complexType name="chemicalComponentType">
  <xsd:choice>
    <xsd:element ref="molecule" />
    <xsd:element ref="ion" />
    <xsd:element ref="atom" />
  </xsd:choice>
</xsd:complexType>

<xsd:complexType name="chemicalCaptionType" minOccurs="0" maxOccurs="2">
  <xsd:sequence>    
    <xsd:element name="caption" type="xsd:string" minOccurs="0" maxOccurs="2" /> 
  </xsd:sequence>    
</xsd:complexType>

</xsd:schema>