sdmx
sdmx copied to clipboard
Clarify role of <com:Link> in SDMX-ML 3.0.0
In the wild, SDMX-ML 3.0.0 from IMF (see specimen here) contains:
…
<str:Codelist urn="urn:sdmx:org.sdmx.infomodel.codelist.Codelist=IMF:CL_FREQ(1.0.3)" agencyID="IMF" id="CL_FREQ" version="1.0.3" isExternalReference="false" isPartial="false">
<com:Link url="urn:sdmx:org.sdmx.infomodel.codelist.Codelist=IMF:CL_FREQ(1.0.3)" type="codelist" rel="self"/>
…
In SDMX 3.0.0:
- The IM (§3.2.2.2, page 31) specifies the following:
IdentifiableArtefact.uri: Universal resource identifier that may or may not be resolvable.IdentifiableArtefact.urn: Universal resource name – this is for use in registries: all registered objects have a urn.
- The class diagram (§3.2.1, page 29) shows these as having type "url" and "urn" respectively, with cardinality of 1.
- The SDMX-ML 3.0.0 schemas (here) show:
…and further that this element has the mandatory<xs:element name="Link" type="LinkType"> <xs:annotation> <xs:documentation>Allows for the linking of other resources to identifiable objects. For example, if there is reference metadata associated with a structure, a link to the meatadata report can be dynamically inserted in the structure metadata.</xs:documentation> </xs:annotation> </xs:element>urlattribute and optionalurnattribute. - The schemas also show, in many places:
In other words, there can be arbitrarily many<xs:element ref="common:Link" minOccurs="0" maxOccurs="unbounded"/><com:Link>elements within a parent element representing an IdentifiableArtefact
Generally, "URN" and "URL" are both subcategories of "URI".
There are multiple things to clarify here:
- Is IdentifiableArtefact.uri supposed to be, per its name, any URI (so possibly a URL or URN) or only (per its type) a URL?
- Is a
<com:Link url="…" rel="self">supposed to correspond to IdentifiableArtefact.uri? - Is SDMX-ML that contains multiple
<com:Link>(as allowed by the XSD) valid? Which should correspond to IdentifiableArtefact.uri? - Is the IMF usage valid in which a URN, not a URL, appears in the
url="…"attribute?
Pending clarification, #227 ignores <com:Link> with a log message.
While I think these are good to clarify, as far as the IMF endpoint, we are planning to remove the generation of the link attribute as part of our responses. Valid or not repeating the URN doesn't seem to add any value.