Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference Metadata attributeType - value discrepency with XML Schema #123

Closed
agent96 opened this issue Jun 29, 2022 · 3 comments
Closed
Labels

Comments

@agent96
Copy link

agent96 commented Jun 29, 2022

The XML schema for the Metadata Attribute has 1->many occurrences of Value (if it is used). The JSON Schema (if I am reading it correctly) supports only 1 value (i.e. it is not an array but a simple type such as string/integer/boolean or localised text).
The constructed samples for the sdmx-json have only single string values.

The supporting documentation in the XML schema for the Value is:

"Value holds any simple value (enumerated or not) for the metadata attribute. It can be repeated if this metadata attribute allows for multiple values"

The MSD supports multiple occurrences of an attribute.

Q) Is the intent to represented multiple occurrences of a value in sdmx-json as multiple attribute objects, each with the same ID and each reporting a single value? (I believe this is how SDMX 2.1 did it).

If so, the xsd should probably change to align.

If this is not the intent then the json schema needs to change to make the value an array of simple types / localised strings.

Either way, the format for XML and json seems to model the multiple occurrences in 2 different ways

@agent96
Copy link
Author

agent96 commented Jun 29, 2022

Note - I think the json schema is correct, and the XML schema is incorrect. The reason being, the Attribute in the XSD describes the number of occurrences, this should be occurrences of the object, not the values - because each Object may have children.

Example:
|-CONTACT - value is a string (occurrences=1 to many)
|--NAME - contact name (only 1 allowed)

The Attribute CONTACT has multiple occurrences but this does not expect multiple values on each occurrence, the value in my example is used as an identifier. Each Contact only has 1 value and 1 child Attribute of Name (with 1 value).

This is also how SDMX 2.1 modelled it.

@dosse dosse self-assigned this Oct 19, 2023
@dosse dosse added the bug label Oct 19, 2023
@dosse
Copy link
Contributor

dosse commented Oct 20, 2023

I agree, because each attribute value may have different children, the attribute needs to be repeated instead of allowing multiple values of one attribute instance.

@dosse
Copy link
Contributor

dosse commented Oct 20, 2023

As this is to be corrected in sdmx-ml moving this ticket to the other repo: sdmx-twg/sdmx-ml#36

@dosse dosse closed this as completed Oct 20, 2023
@dosse dosse removed their assignment Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants