summaryrefslogtreecommitdiff
path: root/test/schemas/changelog093_1.xsd
blob: cf2bcc6faab37a0d8a474c134f3a1514910d32a7 (plain)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.blackperl.com/XML/ChangeLog"
    targetNamespace="http://www.blackperl.com/XML/ChangeLog"
    elementFormDefault="qualified" attributeFormDefault="unqualified"
    version="0.93" id="changelog0.93">
  <!--
      Refer to this schema using the following namespace:
      http://www.blackperl.com/XML/ChangeLog
  -->
  <xsd:annotation>
    <xsd:documentation>
      A description of an XML application which itemizes changes over the
      life-span of a software project. Changes are tracked by releases, with a
      granularity of individual items made up of files that were affected.
    </xsd:documentation>
    <xsd:appinfo xmlns:dc="http://purl.org/dc/elements/1.1/">
      <dc:creator>Randy J. Ray (rjray@blackperl.com)</dc:creator>
      <dc:date>2004-11-22</dc:date>
      <dc:subject>changelog,xml,schema</dc:subject>
      <dc:description>
        An XML Schema declaration describing an XML expression of software
        project change-logs.
      </dc:description>
    </xsd:appinfo>
    <xsd:appinfo>
      <rdf:RDF xmlns:cc="http://web.resource.org/cc/"
               xmlns:dc="http://purl.org/dc/elements/1.1/"
               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
        <cc:Work rdf:about="">
          <dc:title>XML Schema for Changelogs</dc:title>
          <dc:description>
            An XML Schema declaration describing an XML expression of software
            project change-logs.
          </dc:description>
          <dc:creator>
            <cc:Agent>
              <dc:title>Randy J. Ray</dc:title>
            </cc:Agent>
          </dc:creator>
          <dc:rights>
            <cc:Agent>
              <dc:title>Randy J. Ray</dc:title>
            </cc:Agent>
          </dc:rights>
          <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
          <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" />
        </cc:Work>
        <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
          <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction" />
          <cc:permits rdf:resource="http://web.resource.org/cc/Distribution" />
          <cc:requires rdf:resource="http://web.resource.org/cc/Notice" />
          <cc:requires rdf:resource="http://web.resource.org/cc/Attribution" />
          <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
          <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike" />
        </cc:License>
      </rdf:RDF>
    </xsd:appinfo>
  </xsd:annotation>

  <xsd:complexType id="informationType" name="informationType"
                   mixed="true">
    <xsd:annotation>
      <xsd:documentation>
        An open-ended container type for including version-control information
        at various levels within the changelog structure. This is the only
        type which explicitly permits content from foreign namespaces.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence maxOccurs="unbounded" minOccurs="0">
      <xsd:any processContents="lax" />
    </xsd:sequence>
    <xsd:attribute name="source" type="xsd:anyURI" />
    <xsd:anyAttribute namespace="##other" processContents="lax" />
  </xsd:complexType>

  <xsd:complexType id="descriptionType" name="descriptionType">
    <xsd:annotation>
      <xsd:documentation>
        A description block is used to document everything from specific change
        items to the release as a whole.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:extension base="xsd:string">
        <xsd:attribute default="en-US" name="lang" type="xsd:language" />
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>

  <xsd:simpleType id="versionString" name="versionString">
    <xsd:annotation>
      <xsd:documentation>
        The versionString type is applied to attributes that describe simple
        revision-number strings. It only supports CVS (RCS) styled version
        numbers.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string">
      <xsd:pattern value="\d+(\.\d+)*" />
    </xsd:restriction>
  </xsd:simpleType>

  <xsd:complexType id="fileType" name="fileType">
    <xsd:annotation>
      <xsd:documentation>
        The fileType definition is used for the file element, a part of the
        itemType declaration. It is defined separately so that it can be
        referred to from multiple places.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence maxOccurs="1" minOccurs="0">
      <xsd:element name="description" type="tns:descriptionType"
                   minOccurs="0" maxOccurs="unbounded" />
      <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
                   type="tns:informationType" nillable="true" />
    </xsd:sequence>
    <xsd:attribute name="path" type="xsd:string" use="required" />
    <xsd:attribute name="revision" type="tns:versionString" use="optional"/>
    <xsd:attribute name="author" type="xsd:NMTOKEN" use="optional" />
    <xsd:attribute name="action" use="optional">
      <xsd:simpleType>
        <xsd:restriction base="xsd:NMTOKEN">
          <xsd:enumeration value="ADD" />
          <xsd:enumeration value="DELETE" />
          <xsd:enumeration value="RESTORE" />
          <xsd:enumeration value="MOVE" />
        </xsd:restriction>
      </xsd:simpleType>
    </xsd:attribute>
    <xsd:attribute name="note" type="xsd:string" use="optional" />
  </xsd:complexType>

  <xsd:element id="file" name="file" nillable="true" type="tns:fileType">
    <xsd:annotation>
      <xsd:documentation>
        A file element contains a single block representing a fileType.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:unique name="fileDescriptionLangConstraint">
      <xsd:selector xpath="tns:description" />
      <xsd:field xpath="@lang" />
    </xsd:unique>
  </xsd:element>

  <xsd:complexType id="itemType" name="itemType">
    <xsd:annotation>
      <xsd:documentation>
        These element blocks define a single change-item within the scope of a
        given release. A change-item consists of one or more files that were
        affected, and a description of the change itself.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
                   type="tns:informationType" nillable="true" />
      <xsd:choice minOccurs="1" maxOccurs="1">
        <xsd:element ref="tns:file" />
        <xsd:element name="fileset" nillable="false">
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
                           type="tns:informationType" nillable="true" />
              <xsd:element maxOccurs="unbounded" minOccurs="1" ref="tns:file" />
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:choice>
      <xsd:element name="description" type="tns:descriptionType"
                   minOccurs="1" maxOccurs="unbounded" />
    </xsd:sequence>
    <xsd:attribute name="id" type="xsd:ID" />
  </xsd:complexType>

  <xsd:element id="item" name="item" nillable="false" type="tns:itemType">
    <xsd:annotation>
      <xsd:documentation>
        An item element contains a single block representing an itemType.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:unique name="itemDescriptionLangConstraint">
      <xsd:selector xpath="tns:description" />
      <xsd:field xpath="@lang" />
    </xsd:unique>
  </xsd:element>

  <xsd:complexType id="releaseType" name="releaseType">
    <xsd:annotation>
      <xsd:documentation>
        The release is the primary piece of information that a changelog
        collects and organizes. A release contains an optional description,
        followed by one or more item blocks. The release element is also the
        greatest user of attributes besides the file element. A release element
        must have at least a "version" attribute, uniquely identifying the
        release itself. Additionally, it may have "tag" to associate it with
        a release-system tag and "date" to specify the date the release was
        created.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="description" type="tns:descriptionType"
                   minOccurs="0" maxOccurs="unbounded" />
      <xsd:element maxOccurs="unbounded" minOccurs="0" name="information"
                   type="tns:informationType" nillable="true" />
      <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
                   type="tns:informationType" nillable="true" />
      <xsd:element maxOccurs="unbounded" minOccurs="1" ref="tns:item" />
    </xsd:sequence>
    <xsd:attribute name="version" type="xsd:token" use="required" />
    <xsd:attribute name="tag" type="xsd:NMTOKEN" />
    <xsd:attribute name="date" type="xsd:token" use="required" /> <!-- type="xsd:dateTime"  -->
  </xsd:complexType>

  <xsd:element id="release" name="release" nillable="false"
               type="tns:releaseType">
    <xsd:annotation>
      <xsd:documentation>
      </xsd:documentation>
    </xsd:annotation>
    <xsd:unique name="releaseDescriptionLangConstraint">
      <xsd:selector xpath="tns:description" />
      <xsd:field xpath="@lang" />
    </xsd:unique>
  </xsd:element>

  <xsd:element id="changelog" name="changelog" nillable="false">
    <xsd:annotation>
      <xsd:documentation>
        The changelog element is intended as the document root element. It
        contains an overview element (identical in structure to the description
        element, but named differently to prevent collision in XPath queries)
        and one or more release blocks.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element maxOccurs="unbounded" minOccurs="1" name="description"
                     nillable="false" type="tns:descriptionType" />
        <xsd:element maxOccurs="unbounded" minOccurs="0" name="information"
                   type="tns:informationType" nillable="true" />
        <xsd:element maxOccurs="1" minOccurs="0" name="vc-information"
                     type="tns:informationType" nillable="true" />
        <xsd:element maxOccurs="unbounded" minOccurs="1" ref="tns:release" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:unique name="changelogDescriptionLangConstraint">
      <xsd:selector xpath="tns:description" />
      <xsd:field xpath="@lang" />
    </xsd:unique>
  </xsd:element>

</xsd:schema>