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

Possibly bug/breaking change in parent items regular expression #30

Open
achronis opened this issue Nov 26, 2021 · 5 comments
Open

Possibly bug/breaking change in parent items regular expression #30

achronis opened this issue Nov 26, 2021 · 5 comments
Assignees
Labels
bug Something isn't working ready for review

Comments

@achronis
Copy link

Hello,

Just in case it is a bug, It seems that the item Parent restriction doesn't accept values starting with a number, e.g. CL_REF_AREA.

https://github.com/sdmx-twg/sdmx-ml/blob/master/schemas/SDMXStructureCodelist.xsd#L77

<xs:simpleType name="SingleNCNameIDType">

Value '1' is not facet-valid with respect to pattern '[A-Za-z][A-Za-z0-9_\-]*(\.[A-Za-z][A-Za-z0-9_\-]*)*' for type 'SingleNCNameIDType'.line/column: 2/1846343cvc-type.3.1.3: The value '1' of element 'str:Parent'

But at the same time it is allowed to have a code that starts with a number
https://github.com/sdmx-twg/sdmx-ml/blob/master/schemas/SDMXStructureBase.xsd#L49

@stratosn
Copy link
Member

stratosn commented Dec 3, 2021

Thanks! It looks like a bug.
cc @dosse

@dosse
Copy link
Contributor

dosse commented Oct 19, 2023

@achronis I agree that the parent should also be defined by the normal IDType. This is the case for SDMX-JSON.

@jgager @glenntav Could you please confirm that the Code's Parent property should simply be of type IDType?

@dosse dosse added the bug Something isn't working label Oct 19, 2023
@jgager
Copy link

jgager commented Oct 19, 2023

I believe this should be IDType. The rationale behind the NCNameIDType was to restrict component names so that elements and attributes generated in data structure specific schemas would be valid. I am not sure if there was ever a scenario where a code from a dimension code list would have been generated as an element/attribute in a data message (maybe the old cross sectional formats). But that may be why this was in there to begin with and just ended up being over looked. In any case, either code identifier or this parent code reference is the wrong type. I suspect the latter.

@dosse
Copy link
Contributor

dosse commented Oct 19, 2023

@dosse dosse assigned dosse and unassigned jgager Oct 19, 2023
dosse referenced this issue Oct 20, 2023
Change concept parent type to 'common:NCNameIDType'
dosse referenced this issue Oct 20, 2023
Change item's parent type to "common:IDType"
dosse referenced this issue Oct 20, 2023
Change Code Parent to 'common:IDType' type
@dosse
Copy link
Contributor

dosse commented Oct 20, 2023

Ready to merge into Develop branch (branch patch-v3.0.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready for review
Projects
None yet
Development

No branches or pull requests

4 participants