/
physicaldataproduct_ncube_tabular.xsd
267 lines (260 loc) · 18.7 KB
/
physicaldataproduct_ncube_tabular.xsd
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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2014 DDI Alliance, DDI 3.2 release, 2014-02-05
This file is part of DDI 3.2 XML Schema.
DDI 3.2 XML Schema is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
DDI 3.2 XML Schema is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
for more details.
You should have received a copy of the GNU Lesser General Public License along
with DDI 3.2 XML Schema. If not, see <http://www.gnu.org/licenses/>.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="ddi:physicaldataproduct_ncube_tabular:3_2" xmlns:r="ddi:reusable:3_2" xmlns:p="ddi:physicaldataproduct:3_2" targetNamespace="ddi:physicaldataproduct_ncube_tabular:3_2"
elementFormDefault="qualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
<xs:import namespace="ddi:reusable:3_2" schemaLocation="reusable.xsd"/>
<xs:import namespace="ddi:physicaldataproduct:3_2" schemaLocation="physicaldataproduct.xsd"/>
<!-- COMMON RECORD LAYOUT - CUBED - MODULE 2 -->
<xs:element name="RecordLayout" type="RecordLayoutType" substitutionGroup="p:BaseRecordLayout">
<xs:annotation>
<xs:documentation>A member of the BaseRecordLayout substitution group intended for use with tabular formats of NCube Instances held in an external file with location for data items arranged as two-dimensional rows (identified by row and column).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="RecordLayoutType">
<xs:annotation>
<xs:documentation>A member of the BaseRecordLayout substitution group intended for use with tabular formats of NCube Instances held in an external file with location for data items arranged as two-dimensional rows (identified by row and column). In addition to the link to the PhysicalStructure provided by BaseRecordLayout, the record layout is this namespace (m3) identifies the character set and array base for the stored data, a full description of each data item contained within an NCube Instance including a link to its description (matrix address) and its physical location in the file.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="p:BaseRecordLayoutType">
<xs:sequence>
<xs:element ref="r:CharacterSet" minOccurs="0">
<xs:annotation>
<xs:documentation>Character set used in the data file (e.g., US ASCII, EBCDIC, UTF-8). This is a required field.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:ArrayBase">
<xs:annotation>
<xs:documentation>Sets the array base for any arrays used in the definition (that is, whether the first value is in position 0 or 1, etc.). This may be the data array in a delimited data file or the measure array for measures that are bundled and stored in a single location. Array base is generally set to either 0 or 1. There is no override provided as systems processing a record would use a consistent array base.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="NCubeInstance">
<xs:annotation>
<xs:documentation>A container for defining an instance of an NCube, indicating the matrix address of each cell and where the data for each measure within a cell of the NCube is stored. Allows specifying the values of the attributes attached to a NCube.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:NCubeInstanceReference">
<xs:annotation>
<xs:documentation>Reference to an NCubeInstance as expressed in a RecordLayout. TypeOfObject should be NCubeInstance. A container for defining an instance of an NCube, indicating the matrix address of each cell and where the data for each measure within a cell of the NCube is stored. Allows specifying the values of the attributes attached to a NCube.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element ref="TopLeftTableAnchor" minOccurs="0">
<xs:annotation>
<xs:documentation>Notes the column and row position of the top left corner of the data table in the spreadsheet.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="TopLeftTableAnchor" type="TopLeftTableAnchorType">
<xs:annotation>
<xs:documentation>Notes the column and row position of the top left corner of the data table in the spreadsheet.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="TopLeftTableAnchorType">
<xs:annotation>
<xs:documentation>Notes the column and row position of the top left corner of the data table in the spreadsheet.</xs:documentation>
</xs:annotation>
<xs:attribute name="column" type="xs:string" use="required">
<xs:annotation>
<xs:documentation>The column identifier expressed as a string.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="row" type="xs:integer" use="required">
<xs:annotation>
<xs:documentation>The row number expressed as an integer.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="NCubeInstanceType">
<xs:annotation>
<xs:documentation>A container for defining an instance of an NCube, indicating the matrix address of each cell and where the data for each measure within a cell of the NCube is stored. Allows specifying the values of the attributes attached to a NCube.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="r:VersionableType">
<xs:sequence>
<xs:element ref="r:NCubeReference">
<xs:annotation>
<xs:documentation>Reference to the logical NCube description.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:MeasureDimension" minOccurs="0">
<xs:annotation>
<xs:documentation>This element defines the structure of a measure dimension for the NCube Instance. A value along the MeasureDimension is defined by a stack of references to one or more MeasureDefinitions found in the logical description of the NCube with each containing an attribute of orderValue which provides its value for use in the cell address (similar to the use of a CodeRepresentation of a Variable used as a conceptual dimension. This allows measures (whether one or several) to be handled in the same way as the conceptual dimension of the NCube in declaring a cell address. It is assumed that the value of the MeasureDimension is the last value in the address array. For example, for an NCube with 3 conceptual dimensions of rank 1 = Sex, rank 2 = Age, and rank 3 = Educational Attainment, plus a MeasureDimension. The cell address of 1,4,2,2 would indicate Code value of 1 for Sex, 4 for Age, 2 for Educational Attainment, and 2 for MeasureDimension. For systems translating to SDMX or an OLap structure DDI assumes that the MeasureDefinitionReference with the orderValue="1" is the equivalent of the PrimaryMeasure.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="AttachedAttribute" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>This is an attribute attached to the NCube as a whole or a region of the NCube as defined in the logical description as a CoordinateRegion. The content of the attribute can be provided as a single value or reference a location in the data store where the attribute value will be found. This may be in addition to attribute information described in the logical structure.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="DataItem" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Describes a single data item or cell within an NCube Instance. It defines its location within the NCube by its coordinate (matrix) address which is its intersect point on each dimension. Allows for the specification of data item specific attributes, and identifies the physical location of each measure for the data item. May optionally indicate the language of the data contents.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:DefaultDataType" minOccurs="0">
<xs:annotation>
<xs:documentation>An explicit definition of the data type that is applied to the majority of the data items reducing the amount of repetitive markup required. It can be overridden at the data item level. This field is necessary in the case of some numeric data formats where the format definition would allow real values, but the values are integer values. Allowed values are: integer (default), real, string.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:DefaultDelimiter" minOccurs="0">
<xs:annotation>
<xs:documentation>Delimiter definition for delimited (free field) data that is applied to the majority of the data items reducing the amount of repetitive markup required. It can be overridden at the data item level. Allowed values are: Empty (default), Tab, Blank, AnyString. If a delimiter is used, free field (delimited data) is assumed; binary formats are not allowed.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:DefaultDecimalPositions" minOccurs="0">
<xs:annotation>
<xs:documentation>Number of decimal places for data with an implied decimal separator that is applied to the majority of the data items reducing the amount of repetitive markup required. It can be overridden at the data item level. Another expression is the decimal scaling factor (SAS). Default: 0.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:DefaultDecimalSeparator" minOccurs="0">
<xs:annotation>
<xs:documentation>The character used to separate the integer and the fraction part of a number (if an explicit separator is used in the data) that is applied to the majority of the data items reducing the amount of repetitive markup required. It can be overridden at the data item level. Allowed values are: None (default), Dot, Comma, Other. On the basis of the data definition in DDI documents, data processing tools could compute the necessary precision width on the basis of the format width and the existence of separators. Appropriate data types could be used, i.e. float or double, short or long. The decimal separator definition only makes sense with some XML Schema primitives. This is a default which may be overridden in specific cases.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:DefaultDigitGroupSeparator" minOccurs="0">
<xs:annotation>
<xs:documentation>The character used to separate groups of digits (if an explicit separator is used in the data) that is applied to the majority of the data items reducing the amount of repetitive markup required. It can be overridden at the data item level. Allowed values are: None (default), Dot, Comma, Other. The decimal separator definition makes only sense with some XML Schema primitives. This is a default which may be overridden in specific cases.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:NumberOfCases" minOccurs="0">
<xs:annotation>
<xs:documentation>Total number of cases represented by the contents of the NCube. This is normally the sum of the cell contents when the NCube contains counts and sub-totals are not included.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DataItemType">
<xs:annotation>
<xs:documentation>Describes a single data item or cell within an NCube Instance. It defines its location within the NCube by its coordinate (matrix) address which is its intersect point on each dimension. Allows for the specification of data item specific attributes, and identifies the physical location of each measure for the data item. May optionally indicate the language of the data contents.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="r:DimensionRankValue" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>A dimension describes the rank or order of the dimension within the NCube structure and provides the specific coordinate value of the dimension for the data item.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="AttachedAttribute" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>This is an attribute attached to the specified Data Item. The content of the attribute can be provided as a single value or reference a location in the data store where the attribute value will be found. This may be in addition to attribute information described in the logical structure.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="Measure" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Identifies the specific measure of the cell by noting the order value of the measure within the MeasureDimension and provides information on the storage location of the cell value for the measure.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute ref="xml:lang" use="optional">
<xs:annotation>
<xs:documentation>Use to indicate the language of the data item in the file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
<xs:complexType name="MeasureType">
<xs:annotation>
<xs:documentation>Identifies the specific measure of the cell designating the order value of the Measure within the MeasureDimension and provides information on the storage location of the value for the measure. When individual measures are stored in separately identifiable locations repeat Measure to define each measure and storage location. When multiple measures are stored as an ordered array in a single location list each in the array as a MeasureDimensionValue with its specified arrayOrder within a single Measure definition.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="r:MeasureDimensionValue" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specifies the orderValue of the Measure in the MeasureDimension described in the NCubeInstance along with its arrayOrder if multiple measures are provided as an array in a single storage location.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PhysicalTableLocation" minOccurs="0">
<xs:annotation>
<xs:documentation>Description of the physical location of the measure value(s) in the data file.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="AttachedAttributeType">
<xs:annotation>
<xs:documentation>References the attribute description in the NCube and provides for a choice between describing an explicit value, or a location in a file where the value can be found.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element ref="r:AttributeReference">
<xs:annotation>
<xs:documentation>Reference to the attribute described in an NCube.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice minOccurs="0">
<xs:element ref="PhysicalTableLocation">
<xs:annotation>
<xs:documentation>Description of the physical location of the attribute value in the data file.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="r:Value">
<xs:annotation>
<xs:documentation>Contains the value for the attribute.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
<xs:element name="PhysicalTableLocation" type="PhysicalTableLocationType">
<xs:annotation>
<xs:documentation>The location of the data item within a two-dimensional (spreadsheet) storage format.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="PhysicalTableLocationType">
<xs:annotation>
<xs:documentation>The location of the data item within a two-dimensional (spreadsheet) storage format.</xs:documentation>
</xs:annotation>
<xs:complexContent>
<xs:extension base="p:PhysicalLocationType">
<xs:sequence>
<xs:element name="ColumnNumber" type="xs:integer">
<xs:annotation>
<xs:documentation>Column in which data item is found. This is an integer defined in relationship to a specified "first" column NOT the column identifier found in the spreadsheet. Begin numbering columns from the upper left corner of the table as defined in TopLeftTableAnchor attribute "column".</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RowSequence" type="xs:integer" minOccurs="0">
<xs:annotation>
<xs:documentation>A single case may be represented on a single row or a series of rows, particularly when multiple measures are used. This element designates the row, with the assumption that there is a single row per case unless otherwise stated.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="AttachedAttribute" type="AttachedAttributeType">
<xs:annotation>
<xs:documentation>References the attribute description in the NCube and provides for a choice between describing an explicit value, or a location in a file where the value can be found.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NCubeInstance" type="NCubeInstanceType">
<xs:annotation>
<xs:documentation>A container for defining an instance of an NCube, indicating the matrix address of each cell and where the data for each measure within a cell of the NCube is stored.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DataItem" type="DataItemType">
<xs:annotation>
<xs:documentation>Describes a single data item or cell within an NCube Instance.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Measure" type="MeasureType">
<xs:annotation>
<xs:documentation>Identifies the specific measure of the cell by noting the order value of the measure within the MeasureDimension and provides information on the storage location of the cell value for the measure.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:schema>