-
Notifications
You must be signed in to change notification settings - Fork 19
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
Allow StructureSpecific in XML writer #65
Comments
Certainly possible and a desirable enhancement, but non-trivial. The summary: the "inner structure" is generated by the rest of the code in the function you linked to. Every call to Lines 130 to 131 in 3e4cbc1
In this case, Lines 541 to 542 in 3e4cbc1
…and calls that, which in turn recurses for the constituent classes like SeriesKey, Observation, etc. Each method returns In order to output structure-specific SDMX-ML, every such method would need to be extended to (a) check whether generic or structure-specific output is to be produced and (b) if the latter, generate the XML elements and attributes that the standard requires for structure-specific data. (The experiment you mention only changed the name of one particular generated XML element—because it did not alter any of the other code that generates the elements and attributes, the output does not change.) A PR for this would also need appropriate extensions to the test suite. |
@khaeru Thanks, the makes sense. Do you think the Generic and StructureSpecific are pretty much the entirety of the possible formats? Or should this be done in a way that allows for other formats in the future? |
Coding a standards-compliant implementation will require careful attention to the actual standards documents, which will answer that and other questions 🙂 The SDMX website seems to be down at this moment (?!), but here's an archived version: https://web.archive.org/web/20200912164322/https://sdmx.org/?page_id=5008 —§3A is the one you want to consult. For the moment, if each of the affected functions in |
If I'm understanding the DataMessage section in the XML writer code it will always produce "Generic" output. Would it be possible to allow "StructureSpecific" as an alternative?
If so, and you can summarize what needs to happen, I would be happy to submit a pull request. I tried locally just by changing "Generic" to "StructureSpecific" in the line linked above, but that does not alter the inner structure. For example, the output still has "SeriesKey" elements, which to my knowledge is not in StructureSpecific.
The text was updated successfully, but these errors were encountered: