I keep getting an error when parsing this ecg archetype (expressed as XML) and i was wondering if this could be because the archetype was uploaded to the CKM when the CKM used a different version of the published openEHR XSDs, if this used to be a bug of the archetype editor or if it could be something that i am doing wrong.
The error i keep getting is "unrecognised element" for <any_allowed>.
In fact, in my small local collection of archetypes*, this archetype is the only one that has an <any_allowed> element as part of its C_COMPLEX_OBJECT definitions.
If i remove <any_allowed>, the archetype is parsed without any problems, but that's usually a way to create problems, not solve them
I would really like to use this ECG archetype as a test case because it contains a large number of definitions.
According to the specs C_COMPLEX_OBJECT is supposed to inherit "any_allowed" by C_DEFINED_OBJECT but the "Archetype.xsd" does not contain an element / attribute definition for <any_allowed> in any of the relevant class definitions.
This is why i suspect come kind of a (possibly older) mismatch between the CKM / Archetype editor code and the XSDs.
I keep getting an error when parsing this ecg archetype (expressed as XML) and i was wondering if this could be because the archetype was uploaded to the CKM when the CKM used a different version of the published openEHR XSDs, if this used to be a bug of the archetype editor or if it could be something that i am doing wrong.
No - the xml in CKM is produced on the fly from the adl, so it is always up to date…
But of course not necessarily always correct: There may well a bug in the generation process of the Java XML generator,
but can someone say definitely if the any_allowed tag should be in the xml or not, first?
(any_allowed is an operation, not an attribute in the constraint model)
Many archetypes have this in CKM, e.g. when a DV_TEXT is not further constrained, this would be expressed in XML using the any_allowed tag.
Sounds like the Java XML generator needs to be corrected to never spit this out then. This should be straightforward to fix.
I wonder however if this is just in there by mistake and nobody ever cared before that this fairly frequent case breaks the schema or if there was some kind of hidden use case for this.
The XML generator had a comment “not sure if needed” next to the any_allowed related code.
So I have removed this now.
A corrected version is deployed to the openEHR ckm.
Well, last time I checked the serialization and the schema this was
one of the things I was not sure which was correct. I have to get some
time to modify the schema with the missing things I detected some time
ago