On 11/11/2011 13:56, Andrew Patterson wrote:
> On 11/11/2011 11:50 PM, Thomas Beale wrote:
>> "occurrences": "1..*"
>> well that's my opinion as well, and XML-ers always react badly! The
>> 'proper' parser code for dealing with this form, used in the ADL parser
>> is (from the .y file):
>>
> Well I consider myself an XML-er and I don't see massive problems with 
> it, but
> maybe I have become soft in my old age.
>
> My main argument would be that the XML at one point was almost a 
> straight serialization
> of the object model, as supported by various XML data binding 
> libraries. So
> XML -> AOM memory objects -> XML was all doable with very standard
> binding libraries.

yes, that's the way the current schemas look. It seems most people don't 
like them because the XML docs end up being 'big', which seems an 
interminable obsession in XML-land, although noone cares about it much 
in other (more efficient) serialisations. Size sometimes matters - e.g. 
in EHR data. In archetypes, which might one day number in the thousands 
but not more, I think it is of questionable importance. But who am I to 
say....

>
> BUT
>
> I was happy with status quo because I don't really care about the
> size of the XML or how often elements are repeated or the fact that is 
> looks
> ugly to people - if people want compressed data then they should use 
> fastinfoset
> or exi, and then gzip and it'll compress beautifully. The 
> size/format/look
> is a concern to others.
>
> BUT
>
> If I have lost the battle and if we are going to do customised
> XML serializations then once you've taken it outside the
> normal data binding by introducing "*" forms or even
> 'properties' that aren't really properties but kind of quasi computed 
> fields
> then you mind as well as give up on the pretence that the XML 
> serialization
> will bind straight into an AOM compatible object model..
> in which case parsing "1..*" is not a problem

that would also be my point of view, and the current release of the ADL 
Workbench produces this kind of XML, viz:

<children node_id="at0007">
<rm_type_name>ELEMENT</rm_type_name>
</children>
*<cardinality>2..*; ordered</cardinality>*
<is_multiple>True</is_multiple>
</attributes>
</children>
<is_multiple>False</is_multiple>
</attributes>
</children>
*<cardinality>1..*; unordered</cardinality>*
<is_multiple>True</is_multiple>
</attributes>
</children>
<is_multiple>False</is_multiple>
</attributes>
<attributes>
<rm_attribute_name>protocol</rm_attribute_name>
*<existence>1</existence>*
<is_multiple>False</is_multiple>
</attributes>

At least some people don't like this. If the consensus is to use this 
form, then great, it is more reliable, but again, others might not like it.

- thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.openehr.org/mailman/private/openehr-technical_lists.openehr.org/attachments/20111112/db0a0ed9/attachment.html>

Reply via email to