Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 4c65252ca8304fb5c2f478fdb428a4042383c62c (plain) (blame)
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
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.example.com/car.xsd"
           elementFormDefault="qualified"
           attributeFormDefault="unqualified"
           version="0.9.3.0"
           xml:lang="en"
           xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
           xmlns:car="http://www.example.com/car.xsd"
           xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:xlink="http://www.w3.org/1999/xlink">

	<xs:element name="carsList" type="car:CarsList"/>
	
	<xs:complexType name="CarsList">
		<xs:sequence>			
			<xs:element name="carType" type="car:CarType" maxOccurs="unbounded"/>
			<xs:element name="carLink" type="car:CarLink" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
	</xs:complexType>
		
	<xs:complexType name="CarType">
		<xs:sequence>
			<xs:element name="carFrame" type="car:CarFrame" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="carID" type="xs:ID" use="required"/>
	</xs:complexType>
	
	<xs:complexType name="CarLink">
		<xs:attribute name="carLinkId" type="xs:ID" use="required"/>
		<xs:attribute name="name" type="xs:string" use="required"/>
	</xs:complexType>
	
		
	<xs:complexType name="CarFrame">
		<xs:sequence>
			<xs:element name="carWheel"  type="car:CarWheel"  minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="optional"/>
		<xs:attribute name="carLinkRef" type="xs:IDREF" ecore:reference="car:CarLink"/>
	</xs:complexType>
			
	<xs:complexType name="CarWheel">
		<xs:sequence>
			<xs:element name="carTire" type="car:CarTire" minOccurs="0" maxOccurs="unbounded"/>
		</xs:sequence>
		<xs:attribute name="name" type="xs:string" use="optional"/>
	</xs:complexType>
	
	<xs:complexType name="CarTire">
		<xs:attribute name="name" type="xs:ID" use="required"/>
    </xs:complexType>
</xs:schema>

Back to the top