Questions about the XSD-files.

Hi,

I was studying the OpenEHR XSD files, I found they validate fine against Saxon-EE 1.0 and 1.1

But I have a few points which are not clear to me.

1)
In the Structure.xsd I find this line, I don't know why it is there.
<xs:element name="items" type="LOCATABLE"/>

I commented it out, and it still validates fine.

2)
There were some more things in the same file.
There were no element-declarations to the concrete classes, like ITEM_TREE, CLUSTER, and so on.
I would expect them because there are also archetypes in CKM based on these classes/elements and can be instantiated in XML.

I added them, and now I can generate example XML with these classes as root, which was not possible before.

3)
It would be nice to have elements in the base-types XSD too. There is no need for it in the OpenEHR implementation, because they will never be root-element, but it is good to see their XML-structure isolated, for convenience.
I will try that and see if they will be a problem.

4)
And the last point is, I missed the Demographics.xsd, although these RM-classes are also archetypeable and can lead too to XML-instances.

Thanks
Bert Verhees

Hello Bert,

We created a XML Schema for the demographics part some time ago. You
can download it from here.

http://pangea.upv.es/linkehr/wp-content/uploads/2009/03/Demographics.xsd

Regards

Dear Bert

As far as (4) is concerned, i have been using linkEHR's XSD from:
http://pangea.upv.es/linkehr/?page_id=10

hope this helps

All the best
Athanasios Anastasiou

Thanks Athanasios and Diego,

It is easier to download then to write it myself :wink:

But still I wonder why the OpenEHR-community is not offering these.

cheers
Bert

Greetings,
Did I get this right? There are XSDs on openEHR web site. There are also XSDs which are different than the first set, provided by LinkEHR.
If these are XSDs of the published parts of the openEHR specifications, such as RM or AOM, then there should only be one XSD set, published by openEHR.
If the XSDs belong to parts which are not part of the openEHR specs, having more than one XSD theoretically would not hurt interoperability, since they are not openEHR XSDs until they’re published by the foundation, but in practice, this would be a problem waiting to emerge in the future.
Am I missing something here? Multiple XSDs sounds like a big can of worms to me.

Best regards
Seref

Hi Seref,

The XML Schema standard 1.1 has no problem with having multiple files for one definition-set. You can find them linked from the specifications-1.0.2-page.

Bert

Hi Seref,

The openEHR schemas have been there for many years.
http://www.openehr.org/releases/1.0.2/its/XML-schema/index.html

–Tim

Hi Seref
Only one XSD set from openEHR. If we upgrade it has to be formal.
Cheers, Sam

I think I misunderstood the original question. Thanks for all the responses everyone.

Best regards
Seref

Hi Sam and Seref,

Both of you indicate that maintenance of the XSD has to be done formally by the foundation.
This good news, then there will be only a single answer possible for the four questions I started this thread with.

thanks,
Bert

Hi Bert,

Sorry but I struggled to understand the issue you have below. Would you mind looking at my comments below and see if I have understood them correctly?

Heath

(I leave this notice so people understand the torture I went through, while replying to this email)

Hi Bert,

Sorry but I struggled to understand the issue you have below. Would you mind looking at my comments below and see if I have understood them correctly?

Heath

In the Structure.xsd I find this line, I don’t know why it is there.

<xs:element name=“items” type=“LOCATABLE”/>

I commented it out, and it still validates fine.

[HKF: ] What did you comment out, the entire element?

that line is the complete and only global element in this file, and I commented that out, but I added global elements in this file for every type-construct representing a concrete class.

Although this is not necessary when you have a composition instance, if you want to serialize an ITEM_STRUCTURE as a root of an XML document perhaps for a query result or internal application purposes then this gives you a standard schema element to do this. If you don’t use it then commenting out will not hurt. What is the problem with its existence?

I don’t think you should serialize an item_structure as root because it is abstract. There can never be an XML instance of item_structure, and XML Schema’s are to define and validate XML instances and their appearance.

Of course I can comment it out if I want, I can do whatever I want, but I want to conform as much as possible to the OpenEhr specs, even if I do not always agree.

That is why I bring it to discussion, that is why I am glad that the XSD is formally maintained by the foundation, as Seref and Sam indicate.

There were some more things in the same file.

There were no element-declarations to the concrete classes, like ITEM_TREE, CLUSTER, and so on.

[HKF: ] The element above is used for all these subtypes____.

I am afraid that I don’t understand how that works.

In my opinion, there must be an global element declaration for every class which can be used as root. This is what I suggested as alternative for this construct which I don’t understand. For all the classes derived from item_structure, there is no global element defined.

It would be nice to have elements in the base-types XSD too. There is no need for it in the OpenEHR implementation, because they will never be root-element, but it is good to see their XML-structure isolated, for convenience.

[HKF: ] Are you talking about DATA_VALUE types or everything? Personally I don’t see the value it would add overhead n the in memory schema objects used for validation.

There you have a good point, I suggested that also, although, I think the overhead is minimal. It was just for convenience that I did my suggestion and XML schema’s are not for convenience.

So, I think your position in this is reasonable. Let’s forget point 3.

And the last point is, I missed the Demographics.xsd, although these

RM-classes are also archetypeable and can lead too to XML-instances.

[HKF: ] Yeah, I guess that shows t____he EHR focus of the specs. I also have a schema that could be used, I may have already put it up in Jira.

The specs have demographics defined, so, in my opinion, the demographics XSD should be there.

Do you mean, in your last comment, that you put it in Jira, and that that demographics XSD will arrive?

Thanks for your reply

Bert

I think it just did :wink:

Early in 2013, the specifications will be start being revamped. That will be an opportunity for people to offer & improve changes and updates to existing specifications.

- thomas

Why didn't the website offer this XSD, for so many years.
It is especially important because Sam and Seref stress the importance of the XSD and that they are maintained in formal way.
That I never realized.
Under these circumstances it almost begins to look like a statement, but I couldn't imagine what.

So it is just a small question, but it seems hard to answer.

But early 2013 is very near, so I will be patient :slight_smile:
I can live with the XSD from Diego, which looks very well made.

Thanks again Diego.

regards
Bert Verhees

Bert,
You can define elements to be type of an abstract type allowing any concrete subtype in an instance. This is the intent of the items element, to allow any rotatable concrete type to be represented in a document with root element of items.
Heath

Op 27-11-2012 9:07, Heath Frankel schreef:

Bert,
You can define elements to be type of an abstract type allowing any concrete subtype in an instance. This is the intent of the items element, to allow any rotatable concrete type to be represented in a document with root element of items.
Heath

Hi Heath,

You can just have one globally element from Locatable in the XSD, and say that XML-instances must comply to that. (just joking)

Bert,
Items is not a class, it is an attribute.

Heath

Bert,
The rule you reference says nothing about concrete types. As far as I am concerned the items element is satisfying this rule.
You are welcome to change the schema in your system as you see fit just as linkEHR have done, but I suggest any additional element declarations are done in a different namespace otherwise you will be producing incompatible instances.

I am still not understanding you issues with this element other than styling. If you have any technical issue please raise a jira issue.

Heath

Bert,
Items is not a class, it is an attribute.

exactly my idea, it is not an attribute in XSD context, but in class context.

from which class is it an attribute?

Bert

" i am still not understanding you issues with this element other than styling. If you have any technical issue please raise a jira issue"

I still don't understand what humanity did wrong that we need to be punished with iPads, my wife remove all computers from the living space, and bought iPads.

I don't have a Jira account at your site, if I have, I post my XSD's as a proposition.

Thanks
Bert.