~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to data/nitf_spec.xsd

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<!--
 
3
/******************************************************************************
 
4
 * $Id: nitf_spec.xsd 22867 2011-08-06 13:47:27Z rouault $
 
5
 *
 
6
 * Project:  NITF Library
 
7
 * Purpose:  Schema of description of NITF TREs
 
8
 * Author:   Even Rouault, <even dot rouault at mines dash paris dot org>
 
9
 *
 
10
 **********************************************************************
 
11
 * Copyright (c) 2011, Even Rouault
 
12
 *
 
13
 * Permission is hereby granted, free of charge, to any person obtaining a
 
14
 * copy of this software and associated documentation files (the "Software"),
 
15
 * to deal in the Software without restriction, including without limitation
 
16
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
17
 * and/or sell copies of the Software, and to permit persons to whom the
 
18
 * Software is furnished to do so, subject to the following conditions:
 
19
 *
 
20
 * The above copyright notice and this permission notice shall be included
 
21
 * in all copies or substantial portions of the Software.
 
22
 *
 
23
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
24
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
25
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 
26
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
27
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
28
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 
29
 * DEALINGS IN THE SOFTWARE.
 
30
 ****************************************************************************/
 
31
-->
 
32
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
 
33
    <xs:element name="tres">
 
34
        <xs:complexType>
 
35
            <xs:sequence>
 
36
                <xs:element name="tre" type="treType" minOccurs="0" maxOccurs="unbounded"/>
 
37
            </xs:sequence>
 
38
        </xs:complexType>
 
39
    </xs:element>
 
40
 
 
41
    <xs:complexType name="treType">
 
42
        <xs:group ref="itemType"/>
 
43
        <xs:attribute name="name" type="xs:string"/>
 
44
        <xs:attribute name="md_prefix" type="xs:string" use="optional"/>
 
45
        <xs:attribute name="length" type="positiveInteger" use="optional"/>
 
46
        <xs:attribute name="minlength" type="xs:integer" use="optional"/>
 
47
        <xs:attribute name="maxlength" type="xs:integer" use="optional"/>
 
48
        <xs:attribute name="location" type="xs:string" use="optional"/>
 
49
    </xs:complexType>
 
50
 
 
51
    <xs:group name="itemType">
 
52
        <xs:sequence>
 
53
            <xs:choice minOccurs="0" maxOccurs="unbounded">
 
54
                <xs:element name="field" type="fieldType">
 
55
                    <xs:key name="att1">
 
56
                        <xs:selector xpath="."/>
 
57
                        <xs:field xpath="@length|@length_var"/>
 
58
                    </xs:key>
 
59
                </xs:element>
 
60
                <xs:element name="loop" type="loopType">
 
61
                    <xs:key name="att2">
 
62
                        <xs:selector xpath="."/>
 
63
                        <xs:field xpath="@counter|@iterations|@formula"/>
 
64
                    </xs:key>
 
65
                </xs:element>
 
66
                <xs:element name="if" type="ifType"/>
 
67
            </xs:choice>
 
68
            <xs:element name="if_remaining_bytes" type="if_remaining_bytesType" minOccurs="0" maxOccurs="1"/>
 
69
        </xs:sequence>
 
70
    </xs:group>
 
71
 
 
72
    <xs:complexType name="loopType">
 
73
        <xs:group ref="itemType"/>
 
74
        <xs:attribute name="name"/>
 
75
        <!-- xs:choice -->
 
76
            <xs:attribute name="counter" type="xs:string"/>
 
77
            <xs:attribute name="iterations" type="positiveInteger"/>
 
78
            <xs:attribute name="formula">
 
79
                <xs:simpleType>
 
80
                    <xs:restriction base="xs:string">
 
81
                        <xs:enumeration value="(NPART+1)*(NPART)/2"/>
 
82
                        <xs:enumeration value="(NUMOPG+1)*(NUMOPG)/2"/>
 
83
                        <xs:enumeration value="NPAR*NPARO"/>
 
84
                        <xs:enumeration value="NPLN-1"/>
 
85
                        <xs:enumeration value="NXPTS*NYPTS"/>
 
86
                    </xs:restriction>
 
87
                </xs:simpleType>
 
88
            </xs:attribute>
 
89
        <!-- /xs:choice -->
 
90
        <xs:attribute name="md_prefix" use="optional">
 
91
            <xs:simpleType>
 
92
                <xs:restriction base="xs:string">
 
93
                    <xs:pattern value="([a-z]|[A-Z]|[0-9]|_)*(%[0-9]*d)?([a-z]|[A-Z]|[0-9]|_)*"/>
 
94
                </xs:restriction>
 
95
            </xs:simpleType>
 
96
        </xs:attribute>
 
97
    </xs:complexType>
 
98
 
 
99
    <xs:simpleType name="positiveInteger">
 
100
        <xs:restriction base="xs:integer">
 
101
            <xs:minInclusive value="1"/>
 
102
        </xs:restriction>
 
103
    </xs:simpleType>
 
104
 
 
105
    <xs:complexType name="ifType">
 
106
        <xs:group ref="itemType"/>
 
107
        <xs:attribute name="cond">
 
108
            <xs:simpleType>
 
109
                <xs:restriction base="xs:string">
 
110
                    <xs:pattern value=".+[!]?=.*"/>
 
111
                </xs:restriction>
 
112
            </xs:simpleType>
 
113
        </xs:attribute>
 
114
    </xs:complexType>
 
115
 
 
116
    <xs:complexType name="if_remaining_bytesType">
 
117
        <xs:group ref="itemType"/>
 
118
    </xs:complexType>
 
119
 
 
120
    <xs:complexType name="fieldType">
 
121
        <!-- xs:choice -->
 
122
            <xs:attribute name="length" type="positiveInteger"/>
 
123
            <xs:attribute name="length_var" type="xs:string"/>
 
124
        <!-- /xs:choice -->
 
125
        <xs:attribute name="name" type="xs:string" use="optional"/>
 
126
        <xs:attribute name="longname" type="xs:string" use="optional"/>
 
127
        <xs:attribute name="type" use="optional">
 
128
            <xs:simpleType>
 
129
                <xs:restriction base="xs:string">
 
130
                    <xs:enumeration value="string"/>
 
131
                    <xs:enumeration value="integer"/>
 
132
                    <xs:enumeration value="real"/>
 
133
                </xs:restriction>
 
134
            </xs:simpleType>
 
135
        </xs:attribute>
 
136
        <xs:attribute name="unit" type="xs:string" use="optional"/>
 
137
        <xs:attribute name="minval" use="optional"/>
 
138
        <xs:attribute name="maxval" use="optional"/>
 
139
        <xs:attribute name="fixed_value" use="optional"/>
 
140
        <!--<xs:anyAttribute/>-->
 
141
    </xs:complexType>
 
142
</xs:schema>