-
Notifications
You must be signed in to change notification settings - Fork 0
/
IMC_XML_Serialization.xsd
101 lines (101 loc) · 3.82 KB
/
IMC_XML_Serialization.xsd
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
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="IMC">
<xs:annotation>
<xs:documentation source="This schema defines the XML format for IMC message serialization">This message represents a XML serialization of one or more IMC messages</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element name="message" type="messageType">
<xs:unique name="uniqueFieldAbbrev">
<xs:annotation>
<xs:documentation>There can't be repeated fields in the same message</xs:documentation>
</xs:annotation>
<xs:selector xpath="field"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>textual representation of IMC version like 2.2.1</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<!-- <xs:unique name="uniqueMessageId">
<xs:selector xpath="message"/>
<xs:field xpath="@id"/>
<xs:field xpath="@timestamp"/>
</xs:unique> -->
</xs:element>
<xs:complexType name="fieldType" mixed="true">
<xs:choice minOccurs="0">
<xs:element name="inline">
<xs:complexType mixed="true">
<xs:complexContent mixed="true">
<xs:extension base="inlineMsgType"/>
</xs:complexContent>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>optionally inform the type for this field</xs:documentation>
</xs:annotation>
</xs:attribute>
<!-- <xs:sequence minOccurs="0">
<xs:element name="inline" type="inlineMsgType"/>
</xs:sequence>
<xs:attribute name="name" use="required">
<xs:simpleType>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="type" type="xs:string" use="optional">
<xs:annotation>
<xs:documentation>optionally inform the type for this field</xs:documentation>
</xs:annotation>
</xs:attribute>
-->
</xs:complexType>
<xs:complexType name="messageType">
<xs:complexContent>
<xs:extension base="inlineMsgType">
<xs:attribute name="time" type="xs:long" use="required">
<xs:annotation>
<xs:documentation>The time in remote peer, in seconds since 1st January 1970, of message generation </xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="src" type="xs:string">
<xs:annotation>
<xs:documentation>The origin of this message</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="dst" type="xs:string">
<xs:annotation>
<xs:documentation>The final destination of the message</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="inlineMsgType" mixed="true">
<xs:sequence>
<xs:element name="field" type="fieldType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>The value is serialized to string. In case of rawdata, the data is serialized by transforming bytes into hexadecimal representation.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>The message abbreviated name for logging purposes (if this version's definitions is not present)</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>