# List of errors in XML schema spec of AOM

**URL:** <https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596>\
**Category:** Technical (archive)\
**Created:** [21 November 2006 08:21 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596 "2006-11-21T08:21:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mattias\_Forss1](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@Mattias\_Forss1](https://discourse.openehr.org/u/Mattias_Forss1)\
**Post date:** [21 November 2006 08:21 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596/1 "2006-11-21T08:21:42Z")

</div>

Hi again,

As promised, I will provide a list of errors in the XML schema specification of the AOM.

1. Element name ‘rm\_type\_name’ should be renamed to ‘rm\_attribute\_name’ for the C\_ATTRIBUTE entity so that the naming follows the AOM specification.

2. The C\_ATTRIBUTE has an attribute called ‘unbounded’ which follows the AOM specification the existence attribute which is an Interval, but is it really needed in the XML spec, i.e. will there ever be a case where the existence is unbounded?

[http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h-1167105029.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h-1167105029.html)

1. The element name ‘precedence\_overriden’ should be corrected to ‘precedence\_overridden’ here  
[http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h-223793303.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h-223793303.html)

2. There’s an entity called ‘C\_CODED\_TERM’ which is a DOMAIN\_TYPE, but it should probably be renamed to ‘C\_CODED\_TEXT’. If this is a correct assumption, the ‘reference’ element should then be renamed to ‘query’ and another element called ‘subset’ should also be added. See the specification of C\_DV\_CODED\_TEXT in the Archetype Profile specification here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr\_archetype\_profile.pdf](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr_archetype_profile.pdf).

XML spec of ‘C\_CODED\_TERM’ is found here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1644545557.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1644545557.html)

1. In ADL archetypes the ontology section usually contains ‘primary\_language’, ‘languages\_available’, but neither of these are found in the ARCHETYPE\_ONTOLOGY entity in the XML schema spec. When looking through the AOM specification of the ARCHETYPE\_ONTOLOGY I found that these attributes didn’t exist there either - so how come the ADL archetypes contain these attributes?. I can only guess they haven’t evolved as fast as the specifications…

Furthermore, there are two attributes in the AOM specification of ARCHETYPE\_ONTOLOGY that I couldn’t find in the ADL archetypes - namely ‘specialisation\_depth’ and ‘parent\_archetype’. These attributes are not accessible from the ArchetypeOntology class in the 1.0.1-RC1 version of the Java kernel, and the latter is not found in the XML schema spec.

See the XML schema spec of ARCHETYPE\_ONTOLOGY here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1873534858.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1873534858.html)

1. All the sub-classes of C\_PRIMITIVE has an attribute called ‘assumed\_value’, but in the XML schema specs it has mistakenly been spelled ‘assummed\_value’.  
[http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1279968838.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1279968838.html)

Regards,

Mattias

---

<div class="post-metadata">

**Author:** ![Sam](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@Sam](https://discourse.openehr.org/u/Sam)\
**Post date:** [21 November 2006 12:30 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596/2 "2006-11-21T12:30:21Z")

</div>

Mattias  
Thanks - we were not really prepared for people to run with this right now but I include a candidate schema which is in tune with the ADL Parser and encorporates your observations

> 1. Element name ‘rm\_type\_name’ should be renamed to ‘rm\_attribute\_name’ for the C\_ATTRIBUTE entity so that the naming follows the AOM specification.

Andrew P pointed this out some time ago and it is corrected.

> 1. The C\_ATTRIBUTE has an attribute called ‘unbounded’ which follows the AOM specification the existence attribute which is an Interval, but is it really needed in the XML spec, i.e. will there ever be a case where the existence is unbounded?

I believe that it can be unbounded..Tom might want to comment.

> [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h-1167105029.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h-1167105029.html)
> 
> 1. The element name ‘precedence\_overriden’ should be corrected to ‘precedence\_overridden’ here  
> [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h-223793303.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h-223793303.html)

OK

> 1. There’s an entity called ‘C\_CODED\_TERM’ which is a DOMAIN\_TYPE, but it should probably be renamed to ‘C\_CODED\_TEXT’. If this is a correct assumption, the ‘reference’ element should then be renamed to ‘query’ and another element called ‘subset’ should also be added. See the specification of C\_DV\_CODED\_TEXT in the Archetype Profile specification here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr\_archetype\_profile.pdf](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr_archetype_profile.pdf).
> 
> XML spec of ‘C\_CODED\_TERM’ is found here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1644545557.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1644545557.html)

Actually the constraint required is on the CODE\_PHRASE and in the new ADL Parser it is called C\_CODE\_PHRASE. This does not affect the ADL so noone noticed the change. The schema now has C\_CODE\_PHRASE instead.

> 1. In ADL archetypes the ontology section usually contains ‘primary\_language’, ‘languages\_available’, but neither of these are found in the ARCHETYPE\_ONTOLOGY entity in the XML schema spec. When looking through the AOM specification of the ARCHETYPE\_ONTOLOGY I found that these attributes didn’t exist there either - so how come the ADL archetypes contain these attributes?. I can only guess they haven’t evolved as fast as the specifications…

The AOM is version 2 - so I thought we might as well go with this for the XML. Languages available is now in the translations.

> Furthermore, there are two attributes in the AOM specification of ARCHETYPE\_ONTOLOGY that I couldn’t find in the ADL archetypes - namely ‘specialisation\_depth’ and ‘parent\_archetype’. These attributes are not accessible from the ArchetypeOntology class in the 1.0.1-RC1 version of the Java kernel, and the latter is not found in the XML schema spec.

parent\_archetype\_id is part of archetype in the Schema.

> See the XML schema spec of ARCHETYPE\_ONTOLOGY here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1873534858.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1873534858.html)
> 
> 1. All the sub-classes of C\_PRIMITIVE has an attribute called ‘assumed\_value’, but in the XML schema specs it has mistakenly been spelled ‘assummed\_value’.  
> [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1279968838.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1279968838.html)

Andrew picked this up in the Schema also - it has been changed.

Still interested in the changing the term.text and description to attributes - any interest? The implementation is not given in the AOM.

Cheers, Sam

> **(attachments)**
>
> [Archetype.xsd](https://discourse.openehr.org/404) (20.4 KB)

---

<div class="post-metadata">

**Author:** ![Mattias\_Forss1](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/m/e9c0ed/32.png) [@Mattias\_Forss1](https://discourse.openehr.org/u/Mattias_Forss1)\
**Post date:** [21 November 2006 12:55 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596/3 "2006-11-21T12:55:41Z")

</div>

2006/11/21, Sam Heard \<[sam.heard@oceaninformatics.biz](mailto:sam.heard@oceaninformatics.biz)\>:

> Mattias  
> Thanks - we were not really prepared for people to run with this right now but I include a candidate schema which is in tune with the ADL Parser and encorporates your observations

Hi Sam,

Thanks, I’ll have a look at it.

> > 1. There’s an entity called ‘C\_CODED\_TERM’ which is a DOMAIN\_TYPE, but it should probably be renamed to ‘C\_CODED\_TEXT’. If this is a correct assumption, the ‘reference’ element should then be renamed to ‘query’ and another element called ‘subset’ should also be added. See the specification of C\_DV\_CODED\_TEXT in the Archetype Profile specification here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr\_archetype\_profile.pdf](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/openehr_archetype_profile.pdf).
> > 
> > XML spec of ‘C\_CODED\_TERM’ is found here: [http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html\_h1644545557.html](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h1644545557.html)
> 
> Actually the constraint required is on the CODE\_PHRASE and in the new ADL Parser it is called C\_CODE\_PHRASE. This does not affect the ADL so noone noticed the change. The schema now has C\_CODE\_PHRASE instead.

But the C\_CODE\_PHRASE is _not_ a C\_DOMAIN\_TYPE according to the Archetype Profile. Where can I find this class specification? If you look at the schema you see that C\_CODED\_TERM inherits C\_DOMAIN\_TYPE…

> > Furthermore, there are two attributes in the AOM specification of ARCHETYPE\_ONTOLOGY that I couldn’t find in the ADL archetypes - namely ‘specialisation\_depth’ and ‘parent\_archetype’. These attributes are not accessible from the ArchetypeOntology class in the 1.0.1-RC1 version of the Java kernel, and the latter is not found in the XML schema spec.
> 
> parent\_archetype\_id is part of archetype in the Schema.

Okay, I guess the XML schema isn’t completely equal to the AOM in this case because it would require to output yet another archetype in the ARCHETYPE\_ONTOLOGY.

> Still interested in the changing the term.text and description to attributes - any interest? The implementation is not given in the AOM.

This is found in the AOM:

items: Hash \<String, String\>  
Hash of keys (“text”, “description” etc) and corresponding values.

at page 46  
[http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/aom.pdf](http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/architecture/am/aom.pdf)

Cheers,

Mattias

---

<div class="post-metadata">

**Author:** ![Sam](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@Sam](https://discourse.openehr.org/u/Sam)\
**Post date:** [21 November 2006 13:47 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596/4 "2006-11-21T13:47:20Z")

</div>

We need Tom’s input on this. Sam

Mattias Forss wrote:

---

<div class="post-metadata">

**Author:** ![thomas.beale](https://discourse.openehr.org/user_avatar/discourse.openehr.org/thomas.beale/32/35_2.png) [@thomas.beale](https://discourse.openehr.org/u/thomas.beale)\
**Post date:** [26 November 2006 18:07 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596/5 "2006-11-26T18:07:36Z")

</div>

Sam Heard wrote:

> Mattias  
> Thanks - we were not really prepared for people to run with this right  
> now but I include a candidate schema which is in tune with the ADL  
> Parser and encorporates your observations
> 
> > 1. Element name 'rm\_type\_name' should be renamed to  
> > 'rm\_attribute\_name' for the C\_ATTRIBUTE entity so that the naming  
> > follows the AOM specification.
> 
> Andrew P pointed this out some time ago and it is corrected.
> 
> > 2. The C\_ATTRIBUTE has an attribute called 'unbounded' which follows  
> > the AOM specification the existence attribute which is an  
> > Interval\<Integer\>, but is it really needed in the XML spec, i.e. will  
> > there ever be a case where the existence is unbounded?
> 
> I believe that it can be unbounded..Tom might want to comment.

Mattias is correct here semantically. Unbounded is in the AM simply  
because we used the generic type Interval\<T\>, even though in this  
instance it can only ever be 0..0, 0..1, or 1..1

- thomas

---

<div class="post-metadata">

**Author:** ![Sam](https://discourse.openehr.org/letter_avatar_proxy/v4/letter/s/5f9b8f/32.png) [@Sam](https://discourse.openehr.org/u/Sam)\
**Post date:** [27 November 2006 18:41 UTC](https://discourse.openehr.org/t/list-of-errors-in-xml-schema-spec-of-aom/14596/6 "2006-11-27T18:41:23Z")

</div>

I have removed this attribute. Sam

Thomas Beale wrote:
