sdmx3mdt / public-consultation

0 stars 0 forks source link

Remove dataScope from dataSet properties in XML data message #52

Closed dosse closed 3 years ago

dosse commented 3 years ago

It seems that the dataSet property dataScope only exists in the 2.1 xsd schema but not in the SDMX Information Model. Since it doesn't bring any additional information on top of the information in the message header references (dsd, df or pa) and worst, it potentially clashes with it, it should be removed.

The current DataScopeType is defined as:

    <xs:simpleType name="DataScopeType">
        <xs:annotation>
            <xs:documentation>DataScopeType is an enumeration of the possible validity scopes for a data set. These scopes indicate the level at which the data is stated to be valid.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="DataStructure">
                <xs:annotation>
                    <xs:documentation>The data set conforms simply to the data structure definition as it is defined, without regard to any constraints.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ConstrainedDataStructure">
                <xs:annotation>
                    <xs:documentation>The data set conforms to the known allowable content constraints applied to the data structure definition.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="Dataflow">
                <xs:annotation>
                    <xs:documentation>The data set conforms to the known allowable content constraints applied to the dataflow.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ProvisionAgreement">
                <xs:annotation>
                    <xs:documentation>The data set conforms to the known allowable content constraints applied to the provision agreement.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>

Note that it's "DataStructure" value actually allows a message content that violates the SDMX information model. If a constraint has been defined on the data (at whatever level DSD, DF or PA) then allowing a message to carry data not respecting that constraint is a security flaw.

dosse commented 3 years ago

@jgager In today's TWG meeting, a question was raised for you, if you remember specific reasons why this attribute was added and that would need to be considered in the decision for this ticket. Thanks in advance.

@sdmx3mdt Could you please notify @jgager of this question, if required?

jgager commented 3 years ago

@dosse I don't recall anything specific nor do I find any notes relating specifically to it. If I had to hazard a guess, I would say that the intention was to be specific about which constraints were followed, if any.

I agree that it is redundant with the structure reference, since that indicates if that data is reported against a structure, flow, or provision agreement.

dosse commented 3 years ago

Thanks for the quick response, @jgager!

@sdmx3mdt If there is no other follow-up reaction from the TWG, then we could consider the removal of the attribute as approved?

sdmx3mdt commented 3 years ago

@dosse thanks - TWG approved the change in principle so with no technical restrictions we can simply go ahead and apply it. @jgager I'll create a ticket on the SDMX-ML working repo for this.

sdmx3mdt commented 3 years ago

Schemas updated to remove redundant dataScope attribute from the data message.