Hi Andrew,

I looked at your example and I think it could be a good way to use xsi:type
to indicate sub-types where the number of children elements are specified
to be only one. This will mean that we don't need to add an extra
sub-element, e.g. <description xsi:type="RESOURCE_DESCRIPTION"> (details
here:
http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h439624612.html).
However, I don't think the XML schema specification of the AOM explicitly
state that xsi:type should be in XML archetypes. I would appreciate if
openEHR published some XML archetypes that exemplified the standard way to
express them. I don't like the idea of having several ways of representing
archetypes in XML so it would be nice if some examples were out to lead the
way.

When there are more than one child inside an element, the idea with
xsi:type requires us to repeat the container element for each child instead
of placing all children inside a single container element, so you have

 <attributes xsi:type="at:C_MULTIPLE _ATTRIBUTE" minOccurs="1"
maxOccurs="1">
    ...
    <children xsi:type="C_COMPLEX_OBJECT">...</children>
    <children xsi:type="C_COMPLEX_OBJECT">...</children>
</attributes>

instead of

<attributes xsi:type="at:C_MULTIPLE _ATTRIBUTE" minOccurs="1" maxOccurs="1">
    ...
    <children>
        <C_COMLEX_OBJECT>...</C_COMPLEX_OBJECT>
        <C_COMLEX_OBJECT>...</C_COMPLEX_OBJECT>
    </children>
</attributes>

The first example is of course more compact, but the element name "children"
doesn't make sense, since it doesn't contain all of the attribute's
children. The second example will collect all the children in one single
container element, but again, I don't know what the specification mean with
the occurrences brackets, e.g. what does [0..*] refer to in <children>
C_OBJECT<http://svn.openehr.org/specification/BRANCHES/Release-1.1-candidate/publishing/its/XML-schema/documentation/Archetype.xsd.html_h-1665829344.html></children>
[0..*]
? Does it refer to the <children> element or to the C_OBJECT element? This
should be clarified. I have been dealing a lot with ADL and I can say that
the second example seems more plausible to me and I see the children element
equal to an attribute's "matches {}" in ADL.

Any thoughts about this?

Regards,

Mattias

2006/11/16, Andrew Patterson <andrewpatto at gmail.com>:
>
> Hi Mattias, I've attached my attempt at a serialized adl instance -
> perhaps
> we can converge on a consensus as to what they should look like!
>
> Mine is incomplete - especially around the ontology section - but I have
> done the attributes and children nodes differently, using xsi:type to
> indicate the sub-type. This is similar to the way Sam did the reference
> model serializations I saw, so I thought similar techniques would be
> applied here.
>
> Anyhow, I'm off on another project for a few weeks, but I thought I'd
> send you this instance as food for thought.
>
> Andrew
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20061116/5463d26e/attachment.html>
-------------- next part --------------
_______________________________________________
openEHR-technical mailing list
openEHR-technical at openehr.org
http://www.chime.ucl.ac.uk/mailman/listinfo/openehr-technical

Reply via email to