Complete XML schema

Complete XML schema for system description files
 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
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Configuration">
    <xs:complexType>
      <xs:all>
        <xs:element ref="EtherCatObjects" minOccurs="0" maxOccurs="1"/>
      </xs:all>
      <xs:attribute name="UserVersion" type="xs:integer" use="required" />
    </xs:complexType>
  </xs:element>

  <xs:element name="EtherCatObjects">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="EtherCatObject" type="EtherCatObject" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:complexType name="EtherCatObject">
    <xs:sequence>
      <xs:element name="EtherCatObject" type="EtherCatSubObject" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Name" type="xs:string" use="optional"/>
    <xs:attribute name="Index" type="Index" use="required"/>
    <xs:attribute name="DataType" type="DataType" use="optional"/>
    <xs:attribute name="Value" type="xs:string" use="optional"/>
  </xs:complexType>

  <xs:complexType name="EtherCatSubObject">
    <xs:simpleContent>
      <xs:extension base ="xs:string">
        <xs:attribute name="Name" type="xs:string" use="optional"/>
        <xs:attribute name="SubIndex" type="xs:unsignedByte" use="required"/>
        <xs:attribute name="DataType" type="DataType" use="required"/>
        <xs:attribute name="Value" type="xs:string" use="required"/>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

  <xs:simpleType name="Index">
    <xs:restriction base="xs:string">
      <xs:pattern value="0x[0-9A-Fa-f]{4}"/>
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="DataType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Boolean"/>
      <xs:enumeration value="Unsigned8"/>
      <xs:enumeration value="Unsigned16"/>
      <xs:enumeration value="Unsigned24"/>
      <xs:enumeration value="Unsigned32"/>
      <xs:enumeration value="Unsigned40"/>
      <xs:enumeration value="Unsigned48"/>
      <xs:enumeration value="Unsigned56"/>
      <xs:enumeration value="Unsigned64"/>
      <xs:enumeration value="Integer8"/>
      <xs:enumeration value="Integer16"/>
      <xs:enumeration value="Integer24"/>
      <xs:enumeration value="Integer32"/>
      <xs:enumeration value="Integer40"/>
      <xs:enumeration value="Integer48"/>
      <xs:enumeration value="Integer56"/>
      <xs:enumeration value="Integer64"/>
      <xs:enumeration value="Float32"/>
      <xs:enumeration value="Float64"/>
      <xs:enumeration value="VisibleString"/>
      <xs:enumeration value="OctetString"/>
      <xs:enumeration value="UnicodeString"/>
      <!--<xs:enumeration value="TimeOfDay"/> not supported -->
      <!--<xs:enumeration value="TimeDiff"/> not supportef -->
      <xs:enumeration value="Bit1"/>
      <xs:enumeration value="Bit2"/>
      <xs:enumeration value="Bit3"/>
      <xs:enumeration value="Bit4"/>
      <xs:enumeration value="Bit5"/>
      <xs:enumeration value="Bit6"/>
      <xs:enumeration value="Bit7"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>