On 04/23/2013 12:39 PM, Thomas Beale wrote:
> On 23/04/2013 10:37, Bert Verhees wrote:
>>
>> > have ADL, AOM, and object transforms
>>
>> What is missing is that xml offers validation and query out of the 
>> box, which means it has been developed and optimized for years by 
>> many companies and communities, and mostly is good quality software.
>>
>
> ok but we just agreed that XSD doesn't do the kind of validation that 
> is needed by archetypes, so I think what you are really proposing is 
> XML based on Relax NG as a sufficiently powerful approach that would 
> a) implement the required constraint semantics of archetypes and b) 
> create data that can be queried by Xpath/Xquery out of the box?
>
> Is that your suggestion?

Exactly, that is my idea. I already did that for XML-schema, walking 
throug AOM-objects, and defining the structure-constraints and leaf-node 
constraints in XML-schema, but I don't like that very much because of 
the tricks I need to use. My hope is that Relax NG does not require 
these kind of tricks.
But I am not completely ready studying it, but I found that some 
important restrictions (concerning the restrictions in structure) of XML 
Schema do not apply to Relax NG, and I also checked the 
leaf-node-simple-datatypes, where it seems to allow to define all 
possible ADL-constraints.

So, I can build the structure of an archetype, keeping the paths in 
original names, keeping the constraints on the structure, and I can 
apply all leaf-node constraints.

But at this moment I am very busy doing something else, and there is 
(quite) some time-pressure on that, working in the evening, that kind of 
thing.

>
> If so, my reaction would be: let's investigate as a community. I don't 
> think anyone has sufficiently investigated Relax NG or Schematron for 
> openEHR purposes, and in hindsight we probably should have. It would 
> be very interesting indeed to see how much better it would work than XSD.

I will write a paper on it, how the structures and leaf-nodes are to be 
defined in Relax NG and publish that.
Maybe there is still something left to ask or discuss, that is always 
good. It will take a few weeks before I have time for that.

And what do I have then

ADL -> Relax NG conversion -> automatic validation based on good quality 
of code
XML-datasets -> XQuery -> full featured query language.

Optional is AQL -> XQuery syntax transformation, some people find that 
important, I think it is possible.

In fact, the complete OpenEHR ecosystem ready to work with XML, and 
almost everything running on matured code. That is the goal.

Bert

Reply via email to