sdmx3mdt / public-consultation

0 stars 0 forks source link

Clarify how many TimeDimensions a DSD may have #36

Closed dosse closed 3 years ago

dosse commented 3 years ago

There are contradicting pieces of information about the allowed number of time dimensions in a DSD:

If there can only be one TimeDimension, then this should be imposed by the schema. Also note that users have claimed the possibility of using several TimeDimensions within one DSD.

sdmx3mdt commented 3 years ago

16 June 2021 TWG / SWG public consultation public review meeting Decision: DSDs should continue to support only one time dimension.

sdmx3mdt commented 3 years ago

No impact on the Information Model. Section 2 DRAFT 1.0 is correct and states at line 1345 There can be a maximum of one TimeDimension specified in the DimensionDescriptor.

sdmx3mdt commented 3 years ago

Advice from J Gager: While the schema structure for dimension list

                <xs:choice maxOccurs="unbounded">
                    <xs:element ref="Dimension"/>
                    <xs:element ref="TimeDimension"/>
                </xs:choice>

might appear to allow for unbounded time dimensions, the component uniqueness constraint prevents this. It is necessary to do it this way in order to allow for the time dimension to be positioned anywhere in the dimension key. So no change is needed.

However, in reviewing the comments I did see that the dimension type attribute and its uniqueness constraint is no longer needed since measure dimensions have been removed. This has been taken out.

dosse commented 3 years ago

@sdmx3mdt Ok.

And yes, I guess that you mean this:

    <xs:element name="DimensionList" type="DimensionListType" substitutionGroup="ComponentList">
        <xs:annotation>
            <xs:documentation>DimensionList describes the key descriptor for the data structure definition. It is an ordered set of metadata concepts that, combined, classify a statistical series, such as a time series, and whose values, when combined (the key) in an instance such as a data set, uniquely identify a specific series.</xs:documentation>
        </xs:annotation>
        <xs:unique name="SingleMeasureDimension">
            <xs:selector xpath="structure:MeasureDimension"/>
            <xs:field xpath="@type"/>
        </xs:unique>
    </xs:element>
sdmx3mdt commented 3 years ago

SDMX-JSON structure message updated (previously allowed for several timeDimensions).

dosse commented 3 years ago

@sdmx3mdt @jgager In the last TWG it was decided that the single time dimension must always be the last dimension.

Therefor the current choice:

    <xs:complexType name="DimensionListType">
        <xs:complexContent>
            <xs:extension base="DimensionListBaseType">
                <xs:choice maxOccurs="unbounded">
                    <xs:element ref="Dimension"/>
                    <xs:element ref="TimeDimension"/>
                </xs:choice>
            </xs:extension>
        </xs:complexContent>
    </xs:complexType>

should be replaced by a sequence. See also https://github.com/glennmdt/sdmx-ml/issues/88