-
Notifications
You must be signed in to change notification settings - Fork 1
/
u_xml.xsd
62 lines (62 loc) · 2.05 KB
/
u_xml.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
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="node">
<xs:complexType mixed="true">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="node" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="type" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element name="arc">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="src" type="xs:IDREF" use="required"/>
<xs:attribute name="dst" type="xs:IDREF" use="required"/>
<xs:attribute name="src_port" type="xs:integer"/>
<xs:attribute name="dst_port" type="xs:integer"/>
<xs:attribute name="type" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="nodes">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="node" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="nb" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="arcs">
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="arc" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="nb" type="xs:integer"/>
</xs:complexType>
</xs:element>
<xs:element name="u">
<xs:complexType>
<xs:sequence>
<xs:element ref="nodes" minOccurs="0" maxOccurs="1"/>
<xs:element ref="arcs" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="digest" type="xs:string" use="required"/>
</xs:complexType>
<xs:key name="myId">
<xs:selector xpath="./nodes/node"/>
<xs:field xpath="@id"/>
</xs:key>
<xs:keyref name="mySrc" refer="myId">
<xs:selector xpath="./arcs/arc"/>
<xs:field xpath="@src"/>
</xs:keyref>
<xs:keyref name="myDst" refer="myId">
<xs:selector xpath="./arcs/arc"/>
<xs:field xpath="@dst"/>
</xs:keyref>
</xs:element>
</xs:schema>