|
1 <?xml version="1.0" encoding="UTF-8"?> |
|
2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" |
|
3 xmlns="http://unixwork.de/uwproj" |
|
4 targetNamespace="http://unixwork.de/uwproj" |
|
5 elementFormDefault="qualified"> |
|
6 <xs:element name="project" type="ProjectType"/> |
|
7 |
|
8 <xs:complexType name="ProjectType"> |
|
9 <xs:sequence> |
|
10 <xs:element name="property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/> |
|
11 <xs:element name="config" type="ConfigType" minOccurs="0"/> |
|
12 <xs:element name="dependency" type="DependencyType" minOccurs="0" maxOccurs="unbounded"/> |
|
13 <xs:element name="target" type="TargetType" minOccurs="0" maxOccurs="unbounded"/> |
|
14 </xs:sequence> |
|
15 </xs:complexType> |
|
16 |
|
17 <xs:complexType name="PropertyType"> |
|
18 <xs:attribute name="name" type="xs:string" use="required"/> |
|
19 <xs:attribute name="value" type="xs:string" use="required"/> |
|
20 </xs:complexType> |
|
21 |
|
22 <xs:complexType name="ConfigType"> |
|
23 <xs:sequence> |
|
24 <xs:element name="var" type="ConfigVarType" minOccurs="0" maxOccurs="unbounded"/> |
|
25 </xs:sequence> |
|
26 </xs:complexType> |
|
27 |
|
28 <xs:complexType name="ConfigVarType"> |
|
29 <xs:simpleContent> |
|
30 <xs:extension base="xs:string"> |
|
31 <xs:attribute name="name" type="xs:string" use="required"/> |
|
32 <xs:attribute name="type" type="ExecType"/> |
|
33 </xs:extension> |
|
34 </xs:simpleContent> |
|
35 </xs:complexType> |
|
36 |
|
37 <!-- TODO: we should replace this type with a simple Boolean --> |
|
38 <xs:simpleType name="ExecType"> |
|
39 <xs:restriction base="xs:string"> |
|
40 <xs:enumeration value="exec"/> |
|
41 </xs:restriction> |
|
42 </xs:simpleType> |
|
43 |
|
44 <xs:complexType name="DependencyType"> |
|
45 <xs:choice minOccurs="0" maxOccurs="unbounded"> |
|
46 <xs:element name="lang" type="xs:string"/> |
|
47 <xs:element name="cflags" type="FlagsType"/> |
|
48 <xs:element name="ldflags" type="FlagsType"/> |
|
49 <xs:element name="pkgconfig" type="xs:string"/> |
|
50 <xs:element name="test" type="xs:string"/> |
|
51 <xs:element name="make" type="xs:string"/> |
|
52 </xs:choice> |
|
53 <xs:attribute name="name" type="xs:string"/> |
|
54 <xs:attribute name="platform" type="xs:string"/> |
|
55 <xs:attribute name="not" type="xs:string"/> |
|
56 </xs:complexType> |
|
57 |
|
58 <xs:complexType name="FlagsType"> |
|
59 <xs:simpleContent> |
|
60 <xs:extension base="xs:string"> |
|
61 <xs:attribute name="type" type="ExecType"/> |
|
62 </xs:extension> |
|
63 </xs:simpleContent> |
|
64 </xs:complexType> |
|
65 |
|
66 <xs:complexType name="TargetType"> |
|
67 <xs:choice minOccurs="0" maxOccurs="unbounded"> |
|
68 <xs:element name="feature" type="FeatureType"/> |
|
69 <xs:element name="option" type="OptionType"/> |
|
70 <xs:element name="define" type="DefineType"/> |
|
71 <xs:element name="dependencies" type="DependenciesType"/> |
|
72 <xs:element name="alldependencies"> |
|
73 <xs:complexType/> |
|
74 </xs:element> |
|
75 </xs:choice> |
|
76 <xs:attribute name="name" type="xs:string"/> |
|
77 </xs:complexType> |
|
78 |
|
79 <xs:complexType name="FeatureType"> |
|
80 <xs:choice minOccurs="0" maxOccurs="unbounded"> |
|
81 <xs:group ref="TargetDataGroup"/> |
|
82 </xs:choice> |
|
83 <xs:attribute name="name" type="xs:string" use="required"/> |
|
84 <xs:attribute name="arg" type="xs:string"/> |
|
85 <xs:attribute name="default" default="false"> |
|
86 <!-- TODO: this should be just Boolean --> |
|
87 <xs:simpleType> |
|
88 <xs:restriction base="xs:string"> |
|
89 <xs:enumeration value="true"/> |
|
90 <xs:enumeration value="false"/> |
|
91 <xs:enumeration value="on"/> |
|
92 <xs:enumeration value="off"/> |
|
93 </xs:restriction> |
|
94 </xs:simpleType> |
|
95 </xs:attribute> |
|
96 </xs:complexType> |
|
97 |
|
98 <xs:complexType name="OptionType"> |
|
99 <xs:sequence> |
|
100 <xs:element name="value" type="OptionValueType" minOccurs="0" maxOccurs="unbounded"/> |
|
101 <xs:element name="default" type="OptionDefaultType" minOccurs="0" maxOccurs="unbounded"/> |
|
102 </xs:sequence> |
|
103 <xs:attribute name="arg" type="xs:string"/> |
|
104 </xs:complexType> |
|
105 |
|
106 <xs:complexType name="OptionValueType"> |
|
107 <xs:choice minOccurs="0" maxOccurs="unbounded"> |
|
108 <xs:group ref="TargetDataGroup"/> |
|
109 </xs:choice> |
|
110 <xs:attribute name="str" type="xs:string" use="required"/> |
|
111 </xs:complexType> |
|
112 |
|
113 <xs:complexType name="OptionDefaultType"> |
|
114 <xs:attribute name="value" type="xs:string" use="required"/> |
|
115 <xs:attribute name="platform" type="xs:string"/> |
|
116 </xs:complexType> |
|
117 |
|
118 <xs:group name="TargetDataGroup"> |
|
119 <xs:choice> |
|
120 <xs:element name="define" type="DefineType" minOccurs="0" maxOccurs="unbounded"/> |
|
121 <xs:element name="dependencies" type="DependenciesType" minOccurs="0" maxOccurs="unbounded"/> |
|
122 <xs:element name="make" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> |
|
123 </xs:choice> |
|
124 </xs:group> |
|
125 |
|
126 <xs:complexType name="DefineType"> |
|
127 <xs:attribute name="name" type="xs:string" use="required"/> |
|
128 <xs:attribute name="value" type="xs:string"/> |
|
129 </xs:complexType> |
|
130 |
|
131 <xs:simpleType name="DependenciesType"> |
|
132 <xs:restriction base="xs:string"/> |
|
133 </xs:simpleType> |
|
134 </xs:schema> |