# "Missing Element Error" on a subset of archetypes available from the CKM **Category:** [Reference Implementation: Java (archive)](https://discourse.openehr.org/c/reference-implementation-java-archive/154) **Created:** 2012-05-14 17:12 UTC **Views:** 4 **Replies:** 2 **URL:** https://discourse.openehr.org/t/missing-element-error-on-a-subset-of-archetypes-available-from-the-ckm/15172 --- ## Post #1 by @ANASTASIOU_A1 Hello everyone While i was putting together this small list of some issues i have encountered with the published XML / XSDs at http://www.openehr.org/wiki/display/dev/Development+test+base i was reminded of this problem i came across and according to Sebastian Garde's advice as well, i thought i'd post it here: A few weeks ago i went through every XML available to the CKM \(until 18/04/2012\) and discovered that out of the 288 files, 41 \(attached at the end of this message\) were failing to be parsed with: "Missing element error" on DV\_CODED\_TEXT elements \(cannot accept wildcard content CODE\_PHRASE\) \(An earlier suggestion by Sebastian was to use openehrprofile\.xsd as the top level xsd which i was at the time\.\) Any ideas as to why this error might be occurring? Looking forward to hearing from you Athanasios Anastasiou List Of Archetypes with the aforementioned problem: openEHR\-EHR\-EVALUATION\.problem\-diagnosis\.v1\.xml openEHR\-EHR\-OBSERVATION\.barthel\.v1\.xml openEHR\-EHR\-CLUSTER\.exam\-ears\.v1\.xml openEHR\-EHR\-CLUSTER\.symptom\.v1\.xml openEHR\-DEMOGRAPHIC\-CLUSTER\.provider\_identifier\.v1\.xml openEHR\-EHR\-CLUSTER\.exam\-mouth\.v1\.xml openEHR\-EHR\-OBSERVATION\.braden\_scale\-child\.v1\.xml openEHR\-EHR\-OBSERVATION\.glasgow\_coma\.v1\.xml openEHR\-EHR\-OBSERVATION\.apgar\.v1\.xml openEHR\-EHR\-CLUSTER\.clubbing\.v1\.xml openEHR\-EHR\-CLUSTER\.microscopy\_prostate\_carcinoma\.v1\.xml openEHR\-EHR\-CLUSTER\.move\.v1\.xml openEHR\-EHR\-EVALUATION\.triage\.v1\.xml openEHR\-EHR\-OBSERVATION\.intravascular\_pressure\-jvp\.v1\.xml openEHR\-EHR\-CLUSTER\.exam\-uterine\_cervix\.v1\.xml openEHR\-DEMOGRAPHIC\-CLUSTER\.identifier\_other\_details\.v1\.xml openEHR\-EHR\-CLUSTER\.microscopy\_breast\_carcinoma\.v1\.xml openEHR\-EHR\-OBSERVATION\.infant\_feeding\.v1\.xml openEHR\-EHR\-CLUSTER\.exam\-chest\.v1\.xml openEHR\-EHR\-OBSERVATION\.urinalysis\.v1\.xml openEHR\-EHR\-CLUSTER\.palpation\-joint\.v1\.xml openEHR\-EHR\-CLUSTER\.inspection\-skin\-wound\.v1\.xml openEHR\-EHR\-OBSERVATION\.uterine\_contractions\.v1\.xml openEHR\-EHR\-EVALUATION\.risk\-family\_history\.v1\.xml openEHR\-EHR\-OBSERVATION\.faeces\.v1\.xml openEHR\-EHR\-OBSERVATION\.intravascular\_pressure\-cvp\.v1\.xml openEHR\-EHR\-OBSERVATION\.global\.v1\.xml openEHR\-EHR\-CLUSTER\.coordination\.v1\.xml openEHR\-EHR\-CLUSTER\.exam\-uterus\.v1\.xml openEHR\-EHR\-CLUSTER\.inspection\-ear\_canal\.v1\.xml openEHR\-EHR\-CLUSTER\.oedema\.v1\.xml openEHR\-EHR\-OBSERVATION\.waterlow\_score\.v1\.xml openEHR\-EHR\-OBSERVATION\.braden\_scale\.v1\.xml openEHR\-EHR\-CLUSTER\.inspection\-tympanic\_membrane\.v1\.xml openEHR\-EHR\-OBSERVATION\.braden\_scale\_neonate\.v1\.xml openEHR\-EHR\-OBSERVATION\.intravascular\_pressure\.v1\.xml openEHR\-EHR\-CLUSTER\.symptom\-pain\.v1\.xml openEHR\-EHR\-OBSERVATION\.tendon\_babinski\_reflexes\.v1\.xml openEHR\-EHR\-CLUSTER\.move\-joint\.v1\.xml openEHR\-EHR\-CLUSTER\.move\-spine\.v1\.xml openEHR\-EHR\-CLUSTER\.auscultation\-chest\.v1\.xml --- ## Post #2 by @system Hi, I should add that CKM uses the Java XML generator to generate the xml archetypes. Cheers Sebastian --- ## Post #3 by @ANASTASIOU_A1 Hello everyone With reference to my earlier email and because this bug kept coming back annoyingly, i decided to devote a bit more time on it and i think that i have managed to track the problem down\. The short version is this: Certain ARCHETYPE\.definition might contain some C\_DV\_ORDINAL which contains a list of DV\_ORDINALs with the \.value and \.symbol fields\. The \.symbol is a DV\_CODED\_TEXT and is supposed to contain just a \.defining\_code\. So far, so good\.\.\.However, DV\_CODED\_TEXT descends from DV\_TEXT which amongst other \(optional\) fields, contains a \.value with no multiplicity definition\. As such, it is considered mandatory \(http://www.w3.org/TR/xmlschema-0/#OccurrenceConstraints). This makes a valid <symbol> to look like: <symbol><defining\_code/><value/></symbol> instead of: <symbol><defining\_code/></symbol> Which is what appears in the output so far\. In support of this, i am attaching 3 files: openEHR\_CODED\_TEXT\_modrend\.jpg: A quick screenshot showing in parallel fragments of the RM as expressed in the XSD schema and RM model to show that the XSD schema reflects the absence of multiplicity in DV\_TEXT value which is correct according to the specifications \(http://www.openehr.org/svn/specification/TRUNK/publishing/architecture/rm/data_types_im.pdf p\-29\) dummy\_archetype\_AsExported\.xml: Is a fragment of the "Glasgow Coma Scale" which was one of the archetypes in the list in my previous email\. Its definition IS NOT COMPLETE, it just contains the essential elements so that someone can replicate the problem\. dummy\_archetype\_AsConforming\.xml: Is the same fragment but with the added <value> element\. In my setup, "dummy\_archetype\_AsExported\.xml" is the one that produces the error, while "dummy\_archetype\_AsExported\.xml" is parsed and loaded correctly\. Of course, this not only affects loading the archetypes but also trying to create an RM or fragments of it\. Could this be a bug in the CKM? Looking forward to hearing from you Athanasios Anastasiou [details="(attachments)"] ![openEHR\_CODED\_TEXT\_modrend.jpg|1157x501](upload://1skLMjlI4cElKSa3Ll6953GvVcy.jpeg) [dummy\_archetype\_AsConforming.xml|attachment](upload://xfCPKVa2eF5ZuA9iGM2OyfFcMMr.xml) (25.5 KB) [dummy\_archetype\_AsExported.xml|attachment](upload://lk3QBqNRQkC00zPTaZHBwBQthlG.xml) (25.5 KB) [/details] --- **Canonical:** https://discourse.openehr.org/t/missing-element-error-on-a-subset-of-archetypes-available-from-the-ckm/15172 **Original content:** https://discourse.openehr.org/t/missing-element-error-on-a-subset-of-archetypes-available-from-the-ckm/15172