~wattazoum/plinstool/trunk

« back to all changes in this revision

Viewing changes to plinstool-core/src/main/resources/conf/platform_def.xsd

  • Committer: wattazoum
  • Date: 2009-11-11 11:56:09 UTC
  • Revision ID: wattazoum-20091111115609-nhrzplnmlkbx037u
Add Configuration validation against the schema.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="UTF-8"?>
2
 
<schema xmlns="http://www.w3.org/2001/XMLSchema" 
3
 
  xmlns:tns="http://plinstool.wattazoum.fr/platform_def/"
4
 
        targetNamespace="http://plinstool.wattazoum.fr/platform_def/">
5
 
        <element name="platform">
6
 
                <complexType>
7
 
                        <sequence>
8
 
                                <element name="description" type="string" />
9
 
                                <element name="software" maxOccurs="unbounded" minOccurs="0">
10
 
                                        <complexType>
11
 
                                                <sequence>
12
 
                                                        <element name="description" type="string" minOccurs="0" />
13
 
                                                        <element name="item" type="tns:itemType" minOccurs="1"
14
 
                                                                maxOccurs="unbounded" />
15
 
                                                        <element name="dependency" maxOccurs="unbounded"
16
 
                                                                minOccurs="0">
17
 
                                                                <complexType>
18
 
                                                                        <attribute name="name" type="string" />
19
 
                                                                </complexType>
20
 
                                                        </element>
21
 
                                                </sequence>
22
 
                                                <attribute name="name" type="string" />
23
 
                                                <attribute name="level" use="optional">
24
 
                                                        <annotation>
25
 
                                                                <documentation>Platform requirement level.</documentation>
26
 
                                                        </annotation>
27
 
                                                        <simpleType>
28
 
                                                                <restriction base="string">
29
 
                                                                        <enumeration value="mandatory" />
30
 
                                                                        <enumeration value="recommended" />
31
 
                                                                        <enumeration value="optional" />
32
 
                                                                </restriction>
33
 
                                                        </simpleType>
34
 
                                                </attribute>
35
 
                                        </complexType>
36
 
                                </element>
37
 
                </sequence>
38
 
                        <attribute name="name" type="string" />
39
 
                </complexType>
40
 
        </element>
41
 
 
42
 
    <complexType name="itemType">
43
 
        <sequence>
44
 
                <element name="description" type="string" minOccurs="0" maxOccurs="1"/>
45
 
                <element name="option" minOccurs="0" maxOccurs="unbounded">
46
 
                        <complexType>
47
 
                                <attribute name="name" type="string"/>
48
 
                                <attribute name="value" type="string"/>
49
 
                        </complexType>
50
 
                </element>
51
 
        </sequence>
52
 
        <attribute name="name" type="string"/>
53
 
        <attribute name="type" type="string"/>
54
 
    </complexType>
55
 
</schema>
 
 
b'\\ No newline at end of file'
 
2
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
3
  <xs:element name="platformdefinition">
 
4
    <xs:complexType>
 
5
      <xs:sequence maxOccurs="1" minOccurs="1">
 
6
        <xs:element name="Platform">
 
7
          <xs:complexType>
 
8
            <xs:sequence>
 
9
              <xs:element name="description" type="xs:string" minOccurs="0"/>
 
10
              <xs:element name="software" maxOccurs="unbounded" minOccurs="0">
 
11
                <xs:complexType>
 
12
                  <xs:sequence>
 
13
                    <xs:element name="description" type="xs:string" minOccurs="0" />
 
14
                    <xs:element ref="item" minOccurs="1" maxOccurs="unbounded" />
 
15
                    <xs:element name="dependency" maxOccurs="unbounded" minOccurs="0">
 
16
                      <xs:complexType>
 
17
                        <xs:attribute name="name" type="xs:string" />
 
18
                      </xs:complexType>
 
19
                    </xs:element>
 
20
                  </xs:sequence>
 
21
                  <xs:attribute name="name" type="xs:string" />
 
22
                  <xs:attribute name="level" use="optional">
 
23
                    <xs:annotation>
 
24
                      <xs:documentation>Platform requirement level.</xs:documentation>
 
25
                    </xs:annotation>
 
26
                    <xs:simpleType>
 
27
                      <xs:restriction base="xs:string">
 
28
                        <xs:enumeration value="mandatory" />
 
29
                        <xs:enumeration value="recommended" />
 
30
                        <xs:enumeration value="optional" />
 
31
                      </xs:restriction>
 
32
                    </xs:simpleType>
 
33
                  </xs:attribute>
 
34
                </xs:complexType>
 
35
              </xs:element>
 
36
 
 
37
            </xs:sequence>
 
38
            <xs:attribute name="name" type="xs:string" use="required" />
 
39
          </xs:complexType>
 
40
        </xs:element>
 
41
 
 
42
      </xs:sequence>
 
43
    </xs:complexType>
 
44
  </xs:element>
 
45
  <xs:element name="item">
 
46
    <xs:complexType>
 
47
      <xs:sequence>
 
48
        <xs:element name="description" type="xs:string" minOccurs="0" />
 
49
        <xs:element name="option" minOccurs="0" maxOccurs="unbounded">
 
50
          <xs:complexType>
 
51
            <xs:attribute name="name" type="xs:string" />
 
52
            <xs:attribute name="value" type="xs:string" />
 
53
          </xs:complexType>
 
54
        </xs:element>
 
55
      </xs:sequence>
 
56
      <xs:attribute name="name" type="xs:string" />
 
57
      <xs:attribute name="type" type="xs:string" />
 
58
    </xs:complexType>
 
59
  </xs:element>
 
60
 
 
61
</xs:schema>
 
 
b'\\ No newline at end of file'