Friday, April 11, 2008

ANY Datatype in Canadian HL7 version 2 datatypes specification

Rajeev Ayer says:
The ANY data type unfortunately, cannot be defined in any one way using XSD. This will have to be done using a combination of XSD and schematron.

The way I have implemented this is as follows:
1. The XSD ensures that the specializationType attribute must be supplied and must be set to one of the data types that are defined in the spec.

2. The schematron rule will then ensure that the xsi:type attribute of that element is set to the same value as the specializationType.

With these two rules in place, the element should be validated accordingly.

I know this is not backward compatible, but nothing about this part of the specification is backward compatible, so we will have to improvise.

No comments: