Changes for page 4 General Notes for Implementers
Last modified by Helena K. on 2026/06/09 20:04
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -10,7 +10,7 @@ 10 10 11 11 There are several different [[representations>>doc:sdmx:Glossary 2\.1.Representation.WebHome]] in [[SDMX-ML>>doc:sdmx:Glossary 2\.1.SDMX-ML.WebHome]], taken from XML Schemas and common programming [[languages>>doc:sdmx:Glossary 2\.1.Language.WebHome]]. The table below describes the various [[representations>>doc:sdmx:Glossary 2\.1.Representation.WebHome]], which are found in [[SDMX-ML>>doc:sdmx:Glossary 2\.1.SDMX-ML.WebHome]], and their equivalents. 12 12 13 -|(% style="width:191px" %)**SDMX-ML Data Type**|(% style="width:232px" %)**XML Schema Data Type**|(% style="width:212px" %)**.NET Framework Type**|(% style="width:980px" %)((( 13 +|(% style="width:191px" %)**[[SDMX-ML>>doc:sdmx:Glossary 2\.1.SDMX-ML.WebHome]] Data Type**|(% style="width:232px" %)**XML Schema Data Type**|(% style="width:212px" %)**.NET Framework Type**|(% style="width:980px" %)((( 14 14 **Java Data Type** 15 15 ))) 16 16 |(% style="width:191px" %)String|(% style="width:232px" %)xsd:string|(% style="width:212px" %)System.String|(% style="width:980px" %)java.lang.String ... ... @@ -18,7 +18,7 @@ 18 18 |(% style="width:191px" %)Integer|(% style="width:232px" %)xsd:int|(% style="width:212px" %)System.Int32|(% style="width:980px" %)int 19 19 |(% style="width:191px" %)Long|(% style="width:232px" %)xsd.long|(% style="width:212px" %)System.Int64|(% style="width:980px" %)long 20 20 |(% style="width:191px" %)Short|(% style="width:232px" %)xsd:short|(% style="width:212px" %)System.Int16|(% style="width:980px" %)short 21 -|(% style="width:191px" %)[[Decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]|(% style="width:232px" %)xsd:decimal|(% style="width:212px" %)System.Decimal|(% style="width:980px" %)java.math.BigDecimal 21 +|(% style="width:191px" %)[[Decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]|(% style="width:232px" %)xsd:[[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]|(% style="width:212px" %)System.[[Decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]|(% style="width:980px" %)java.math.BigDecimal 22 22 |(% style="width:191px" %)Float|(% style="width:232px" %)xsd:float|(% style="width:212px" %)System.Single|(% style="width:980px" %)float 23 23 |(% style="width:191px" %)Double|(% style="width:232px" %)xsd:double|(% style="width:212px" %)System.Double|(% style="width:980px" %)double 24 24 |(% style="width:191px" %)Boolean|(% style="width:232px" %)xsd:boolean|(% style="width:212px" %)System.Boolean|(% style="width:980px" %)boolean ... ... @@ -37,9 +37,9 @@ 37 37 * **Alpha** (**common:AlphaType**, string which only allows A-z) 38 38 * **Numeric** (**common:NumericType**, string which only allows 0-9, but is not numeric so that is can having leading zeros) 39 39 * **Count** (**xs:integer**, a sequence with an interval of "1") 40 -* **InclusiveValueRange** (**xs:decimal** with the **minValue** and **maxValue** [[facets>>doc:sdmx:Glossary 2\.1.Facet.WebHome]] supplying the bounds) 41 -* **ExclusiveValueRange** (**xs:decimal** with the **minValue** and **maxValue** [[facets>>doc:sdmx:Glossary 2\.1.Facet.WebHome]] supplying the bounds) 42 -* **Incremental** (**xs:decimal** with a specified **interval**; the interval is typically enforced outside of the XML validation) 40 +* **InclusiveValueRange** (**xs:[[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** with the **minValue** and **maxValue** [[facets>>doc:sdmx:Glossary 2\.1.Facet.WebHome]] supplying the bounds) 41 +* **ExclusiveValueRange** (**xs:[[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** with the **minValue** and **maxValue** [[facets>>doc:sdmx:Glossary 2\.1.Facet.WebHome]] supplying the bounds) 42 +* **Incremental** (**xs:[[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** with a specified **interval**; the interval is typically enforced outside of the XML validation) 43 43 * **TimeRange** (**common:TimeRangeType**, **startDateTime** + **Duration**) 44 44 * **ObservationalTimePeriod** (**common:ObservationalTimePeriodType**, a union of **StandardTimePeriod** and **TimeRange**). 45 45 * **StandardTimePeriod** (**common:StandardTimePeriodType**, a union of **BasicTimePeriod** and **ReportingTimePeriod**). ... ... @@ -63,15 +63,14 @@ 63 63 * **isSequence = true | false** (indicates a sequentially increasing value) 64 64 * **minLength = positive integer** (# of characters/digits) 65 65 * **maxLength = positive integer** (# of characters/digits) 66 -* **startValue = decimal** (for numeric sequence) 67 -* **endValue = decimal** (for numeric sequence) 68 -* **interval = decimal** (for numeric sequence) 69 -* **timeInterval = duration** 66 +* **startValue = [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** (for numeric sequence) 67 +* **endValue = [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** (for numeric sequence) 68 +* **interval = [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** (for numeric sequence) • **timeInterval = duration** 70 70 * **startTime = BasicTimePeriod** (for time range) 71 71 * **endTime = BasicTimePeriod** (for time range) 72 -* **minValue = decimal** (for numeric range) 73 -* **maxValue = decimal** (for numeric range) 74 -* **decimal = Integer** (# of digits to right of [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]] point) 71 +* **minValue = [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** (for numeric range) 72 +* **maxValue = [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]]** (for numeric range) 73 +* **[[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]] = Integer** (# of digits to right of [[decimal>>doc:sdmx:Glossary 2\.1.Decimals.WebHome]] point) 75 75 * **pattern =** (a regular expression, as per W3C XML Schema) 76 76 * **isMultiLingual = boolean** (for specifying text can occur in more than one [[language>>doc:sdmx:Glossary 2\.1.Language.WebHome]]) 77 77 ... ... @@ -79,7 +79,7 @@ 79 79 80 80 === 4.1.1 Data Types === 81 81 82 -XML and JSON schemas support a variety of data types that, although rich, are not mapped one-to-one in all cases. This section provides an explanation of the mapping performed in [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] 3.0, between such cases. 81 +XML and JSON schemas support a variety of data types that, although rich, are not (% style="color:#e74c3c" %)mapped(%%) one-to-one in all cases. This section provides an explanation of the mapping performed in [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] 3.0, between such cases. 83 83 84 84 For identifiers, text fields and [[Codes>>doc:sdmx:Glossary 2\.1.Code.WebHome]] there are no restriction from either side, since a generic type (e.g., that of string) accompanied by the proper regular expression works equally well for both XML and JSON. 85 85 ... ... @@ -100,12 +100,12 @@ 100 100 > "pattern": "^[A-Za-z0-9_@$-]+$" 101 101 > } 102 102 103 -There are also cases, though, that data types cannot be mapped like above. One such case is the array data type, which was introduced in [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] 3.0 as a new [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]]. In JSON schema an array is already natively foreseen, while in the XML schema, this has to be defined as a complex type, with an [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] specific definition (i.e., specific element/[[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] names for [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]]). Beyond that, the minimum and/or maximum number of items within an array is possible in both cases. 102 +There are also cases, though, that data types cannot be (% style="color:#e74c3c" %)mapped(%%) like above. One such case is the array data type, which was introduced in [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] 3.0 as a new [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]]. In JSON schema an array is already natively foreseen, while in the XML schema, this has to be defined as a complex type, with an [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] specific definition (i.e., specific element/[[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] names for [[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]]). Beyond that, the minimum and/or maximum number of items within an array is possible in both cases. 104 104 105 105 Further to the above, the mapping between the non-native data types is presented in the table below: 106 106 107 107 (% style="width:1005.83px" %) 108 -|(% style="width:198px" %)**SDMX Facet**|(% style="width:241px" %)**XML Schema**|(% style="width:563px" %)**JSON schema **"**pattern**"{{footnote}}Regular expressions, as specified in W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes.{{/footnote}} **for "string" type** 107 +|(% style="width:198px" %)**[[SDMX>>doc:sdmx:Glossary 2\.1.Statistical data and metadata exchange.WebHome]] [[Facet>>doc:sdmx:Glossary 2\.1.Facet.WebHome]]**|(% style="width:241px" %)**XML Schema**|(% style="width:563px" %)**JSON schema **"**pattern**"{{footnote}}Regular expressions, as specified in W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes.{{/footnote}} **for "string" type** 109 109 |(% style="width:198px" %)GregorianYear|(% style="width:241px" %)xsd:gYear|(% style="width:563px" %)((( 110 110 "^-?([1-9][0-9]{3,}|0[0-9]{3})(Z|(\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?$" 111 111 ))) ... ... @@ -230,7 +230,7 @@ 230 230 [[Representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]]: common:ReportingDayType (YYYY-Dddd, e.g. 2000-D366) Notes: There are either 365 or 366 days in a reporting year, depending on whether the reporting year includes leap day (February 29). The reporting day is always represented as three digits, therefore 1-99 are 0 padded (e.g. 001). This allows the values to be sorted chronologically using textual sorting methods. 231 231 The meaning of a reporting year is always based on the start day of the year and requires that the reporting year is expressed as the year at the start of the period. This start day is always the same for a reporting year, and is expressed as a day and a month (e.g. July 1). Therefore, the reporting year 2000 with a start day of July 1 begins on July 1, 2000. 232 232 233 -A specialized [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] (reporting year start day) exists for the purpose of communicating the reporting year start day. This [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] has a fixed identifier (REPORTING_YEAR_START_DAY) and a fixed [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]] (xs:gMonthDay) so that it can always be easily identified and processed in a data message. Although this [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] exists in specialized sub-class, it functions the same as any other [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] outside of its identification and [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]]. It must takes its identity from a [[concept>>doc:sdmx:Glossary2\.1.Concept.WebHome]]and state its relationship with other [[components>>doc:sdmx:Glossary 2\.1.Component.WebHome]] of the [[data structure definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]. The ability to state this relationship allows this reporting year start day [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] to exist at the appropriate levels of a data message. In the absence of this [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]], the reporting year start date is assumed to be January 1; therefore if the reporting year coincides with the calendar year, this [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] is not necessary.232 +A specialized [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] (reporting year start day) exists for the purpose of communicating the reporting year start day. This [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] has a fixed identifier (REPORTING_YEAR_START_DAY) and a fixed [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]] (xs:gMonthDay) so that it can always be easily identified and processed in a data message. Although this [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] exists in specialized sub-class, it functions the same as any other [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] outside of its identification and [[representation>>doc:sdmx:Glossary 2\.1.Representation.WebHome]]. It must takes its identity from a (% style="color:#e74c3c" %)concept(%%) and state its relationship with other [[components>>doc:sdmx:Glossary 2\.1.Component.WebHome]] of the [[data structure definition>>doc:sdmx:Glossary 2\.1.Data structure definition.WebHome]]. The ability to state this relationship allows this reporting year start day [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] to exist at the appropriate (% style="color:#e74c3c" %)levels(%%) of a data message. In the absence of this [[attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]], the reporting year start date is assumed to be January 1; therefore if the reporting year coincides with the calendar year, this [[Attribute>>doc:sdmx:Glossary 2\.1.Attribute.WebHome]] is not necessary. 234 234 235 235 Since the duration and the reporting year start day are known for any reporting period, it is possible to relate any reporting period to a distinct calendar period. The actual Gregorian calendar period covered by the reporting period can be computed as follows (based on the standard format of [REPROTING_YEAR]-[PERIOD_INDICATOR][PERIOD_VALUE] and the reporting year start day as [REPORTING_YEAR_START_DAY]): 236 236