Hi All,
I have a question about XML representation of data types:
in an XML file, each attribute of a data type has to be a tag and if the data type has one or many parent, the parents’ attributes should be included as different tags. The point is that in some data types, the type of an attribute is another data type and when you want to represent it in an XML, there would be confusion. For example, this is an XML part for DV_CODED_TEXT:
<…>
string [1]
DV_URI [0..1]
string [0..1]
matchString [1]
DV_CODED_TEXT [0..1]
<terminology_id> TERMINOLOGY_ID</terminology_id> [1]
<code_string> string </code_string> [1]
[1]
[0..*]
<terminology_id> TERMINOLOGY_ID</terminology_id> [1]
<code_string> string </code_string> [1]
[0..1]
<terminology_id> TERMINOLOGY_ID</terminology_id> [1]
<code_string> string </code_string> [1]
[0..1]
<defining_code>
<terminology_id> TERMINOLOGY_ID</terminology_id> [1]
<code_string> string </code_string> [1]
</defining_code> [1]
</…>
Which includes DV_TEXT’s attributes as xlm tags. But DV_TEXT uses DV_CODED_TEXT type for “purpose/mapping” attribute. So there will be a loop that uses DV_CODED_TEXT in DV_CODED_TEXT and it will never reach to a basic type like string,… .It happens in some other types like DV_ORDERED and DV_INTERVAL that each one uses other as a type for an attribute. I got confused that how it can be shown in a XML format.
Is there any idea?
Thanks in advance
Masoumeh
|
Hi Seydi
You can use the XML Schemas from the openEHR site which already provide the solution. Recursive use of data types is why we have data types in openEHR and do not just accept the core C# or Java types as the basis for building software. Consistency is very important.
The schemas are at:
http://www.openehr.org/releases/1.0.2/its/XML-schema/index.html
Cheers, Sam