# ADL to XML Schema **Category:** [Technical (archive)](https://discourse.openehr.org/c/technical-archive/156) **Created:** 2005-03-08 10:45 UTC **Views:** 4 **Replies:** 29 **URL:** https://discourse.openehr.org/t/adl-to-xml-schema/15565 --- ## Post #1 by @Alfonso_Mata Hello everybody, We're working at University of Zaragoza \(Spain\) on a EHR system\. We want to conform to 13606 and make use of ADL\-based archetypes\. We are just starting and we have lots of doubts about how to implement and apply all concepts\. These are our questions: \- How 13606 is applied to built ADL archetypes? Is it already possible? \- Is it possible to obtain a XML\-Schema based on 13606 from an ADL file? \- Is ADL parser in openEHR site the only one to make use of it? We hope that someone can show us the way\.\.\. Thanks\. Sorry for our "spanglish"\! Regards, Alfonso Mata University of Zaragoza, Spain --- ## Post #2 by @Rahil Hi Alfonso I can answer one of your questions for certain and am not very sure about another one\. Alfonso Mata wrote: > \- Is it possible to obtain a XML\-Schema based on 13606 from an ADL file? > You can obtain an XML representation of the ADL Archetype from the Archetype Editor but not an XML Schema\. Atleast not at the moment\. However Im trying to write out a schema based on the UML Archetype Object Model\. Its not proving to be an easy task is all I can say \! I've done one version of the schema but its far from perfect to generate a sensible XML\. If you are interested in doing some work on this we could collaborate\. > \- Is ADL parser in openEHR site the only one to make use of it? > Making use of what ? Sorry didnt quite understand\. Rahil --- ## Post #3 by @Alfonso_Mata Thanks Rahil, I mean, is there another parser available with similar features? Alfonso Mata University of Zaragoza, Spain --- ## Post #4 by @Gavin_Brelstaff Rahil Qamar wrote: > Hi Alfonso > > I can answer one of your questions for certain and am not very sure about another one\. > > Alfonso Mata wrote: > >> \- Is it possible to obtain a XML\-Schema based on 13606 from an ADL file? >> > > You can obtain an XML representation of the ADL Archetype from the Archetype Editor but not an XML Schema\. Atleast not at the moment\. However Im trying to write out a schema based on the UML Archetype Object Model\. Its not proving to be an easy task is all I can say \! I've done one version of the schema but its far from perfect to generate a sensible XML\. If you are interested in doing some work on this we could collaborate\. There are some less heavy ways of doing XML rule checking that avoid most of the irrational intricacies of the W3C Schema\. Did you ever explore Jim Clark's RelaxNG for schema validation of XML structures, and Schematron for rules involving Co\-occurance relationships\. That might be a way to go\. --- ## Post #5 by @Rahil Alfonso Mata wrote: > Thanks Rahil, > > I mean, is there another parser available with similar features? > The ADL Parser is, as far as I am aware, the only one with parsing capabilities\. I think there is some work being done by people in Sweden which might be close\. However the official version is the ADL Parser released by the openEHR community\. Rahil --- ## Post #6 by @Rahil Gavin Brelstaff wrote: > Rahil Qamar wrote: > >> >> You can obtain an XML representation of the ADL Archetype from the Archetype Editor but not an XML Schema\. Atleast not at the moment\. However Im trying to write out a schema based on the UML Archetype Object Model\. Its not proving to be an easy task is all I can say \! I've done one version of the schema but its far from perfect to generate a sensible XML\. If you are interested in doing some work on this we could collaborate\. > > There are some less heavy ways of doing XML rule checking that > avoid most of the irrational intricacies of the W3C Schema\. > Did you ever explore > Jim Clark's RelaxNG for schema validation of XML structures, > and > Schematron for rules involving Co\-occurance relationships\. > No I havent looked into this but it seems like some good stuff to look into\. Thanks Rahil --- ## Post #7 by @rong.chen Hi Rahil and Alfonso, We have developed an ADL parser that generates instance of archetype model\. The parser is based on javaCC and we use it to create archetypes for runtime use\. We plan to release it under open source license after our open source openehr kernel implementation is announced by openEHR together with new release of specifications\. The reason is that the parser has some dependency to the kernel code\. Best regards, Rong Rong Chen Acode HB, Sweden http://www.acode.se Rahil Qamar wrote: --- ## Post #8 by @David_Forslund I've been looking at schematron for doing the "equivalent" of archetype in a more general situation, particularly since there as been no ADL parser available in Java\. Schematron seems to be reasonably popular for enforcing rules for XML data structures and there is a variety of software available for using it\. Dave --- ## Post #9 by @Rahil Hi Alfonso Have just returned from an all\-day meeting on archetypes and I think Ill be able to answer your first question as well now\. Alfonso Mata wrote: > \- How 13606 is applied to built ADL archetypes? Is it already possible? > The latest draft of EN13606 archetypes is due to be reviewed by various standards bodies and then released as a standard by 2006\. The archetypes being built at the moment conform to the CEN EHR model and are in ADL syntax\. A place to look at for more reading material on the standards and where archetypes stand at the moment is http://www.openehr.org/standards/t_cen.htm \. Im sure others on the mailing list might have more inputs on possible reading sources\. And yeah, its already possible\. However older versions of arhcetypes are still being used in some applications\. The way forward really is to work with the latest version of archetypes\. Check out some sample archetypes on http://www.oceaninformatics.biz/ \(browse through the section on 'Looking for archetypes?'\) Hope this helps Rahil --- ## Post #10 by @Sam David W\. Forslund Good to see you sniffing around\! The key issue for us in ADL is that Eiffel is not UNICODE compliant\. There will be a number of Java parsers soon, and I hope a JAVA archetype editor\. I am interested in what you can do with Schematron as well as another implementation route\.\.\.\.keep me up to speed\. Cheers, Sam --- ## Post #11 by @Heath_Frankel4 Dear Sam, etal, I wonder if the specialised schema approach for archetypes is one that openEHR should encourage\. Not so much discourage the investigation but at least indicate to those who are going down this route that previous work by Ocean and DSTC has indicated that the approach is not workable in a dual layer model approach\. Perhaps the more useful task is to find a suitable schema for ADL if this has not already been done for which archetype definitions can be validated against, not instances\. Perhaps it should be encouraged to use some existing schema's such as OWL but again this is representing the archetype definition not the archetype instance\. Perhaps, the DSTC approach to represent archetypes using XML with a XML schema for the Archetype Model should be endorsed by openEHR if this is the preferred approach so people don't waste their time and develop a proliferation of approaches which are likely to be incompatible or at least require translation\. What would be better use of peoples time would be the investigation of an archetype instance validating parser that uses the XML document representing the archetype definition similar to an XML validating parser uses xml schema \(which is also an XML document\)\. The reason we need to have an XML document represent the archetype is because of the dual layer model approach where the XML schema is used at the reference model level and an xml instance can't have two associated schemas for validation for each level\. However, from my understanding \(which is limited\), this is not an issue in some of these other schema systems like Schematron and RelaxNG, so it might be useful for people to investigate these if they really want to represent archetypes as XML schema's but knowing that traditional parsers and XML tools will not support this due to the dual layer model approach\. Regards Heath --- ## Post #12 by @David_Forslund What I would like to do is automatically translate from an ADL description to a schematron description\. Hopefully, this is semantically possible\. Dave --- ## Post #13 by @Sam Dave I am not familiar with Schematron\. I have had a look on the web, at some tutorials etc \- and it is available in the Oxygen editor that I use\. Generally the openEHR approach has been to apply archetypes to the reference model in memory\. This works well and is proven\. What you are proposing, as far as I can see, might lead to a schema for a composition \- where the schema met both the archetype constraints and the reference model schema\. It will be relatively easy to test this with something like the blood pressure archetype\. At the moment I can only give you XML data that fit the RM schema \- the archetype constraints are only expressed in our in memory objects\. I enclose the archetype and data for your information\. If we could spit out a schema based on a template \(a composition built from a set of archetypes\) and express the constraints in the archetype, this would be well received\. It would mean that standard compositions, like a discharge summary or a laboratory report, could be expressed as XML schema \+ Schematron\. I believe this is worth investigating\. Cheers, Sam David W\. Forslund wrote: [details="(attachments)"] [openEHR-EHR-OBSERVATION.blood\_pressure.v1.adl|attachment](upload://8r6qwo0Z6nqC95HGFQVTUJcQDga.adl) (15.8 KB) [BloodPressure.xml|attachment](upload://1unGkjEbiDgta6SHvTLsgnJrnG5.xml) (3.22 KB) [/details] --- ## Post #14 by @David_Forslund Sam Heard wrote: > Dave > > I am not familiar with Schematron\. I have had a look on the web, at some tutorials etc \- and it is available in the Oxygen editor that I use\. Generally the openEHR approach has been to apply archetypes to the reference model in memory\. This works well and is proven\. > > What you are proposing, as far as I can see, might lead to a schema for a composition \- where the schema met both the archetype constraints and the reference model schema\. > > It will be relatively easy to test this with something like the blood pressure archetype\. At the moment I can only give you XML data that fit the RM schema \- the archetype constraints are only expressed in our in memory objects\. I enclose the archetype and data for your information\. > > If we could spit out a schema based on a template \(a composition built from a set of archetypes\) and express the constraints in the archetype, this would be well received\. It would mean that standard compositions, like a discharge summary or a laboratory report, could be expressed as XML schema \+ Schematron\. > > I believe this is worth investigating\. I'll check into this as time permits but would appreciate it if others do the same\. It seems to me that the Schematron could be used to express an ADL constraint although perhaps not quite as elegantly\. Dave --- ## Post #15 by @helmavdl Hi, without much knowledge of Schematron, I believe it is good for expressing validation rules, but I wonder if it can actually be used to express calculations, like the BMI or the Barthel Index \(sum of the score of 10 values\)\. I'm currently looking at XQuery that can do such things\. Bye, Helma --- ## Post #16 by @David_Forslund Schematron supports at least some calculations, but probably not elaborate ones\. I'm not sure what is needed here\. The sume of the score of 10 values is something that it can do: http://www.zvon.org/xxl/SchematronTutorial/Examples/Example13/example.html although I'm not sure about floating point \(which is added in XSL 2\.0, I believe\) Dave Linden H van der \(MI\) wrote: --- ## Post #17 by @thomas.beale Alfonso Mata wrote: > Hello everybody, > > We're working at University of Zaragoza \(Spain\) on a EHR system\. We > want to conform to 13606 and make use of ADL\-based archetypes\. We are > just starting and we have lots of doubts about how to implement and > apply all concepts\. These are our questions: > > \- How 13606 is applied to built ADL archetypes? Is it already possible? > \- Is it possible to obtain a XML\-Schema based on 13606 from an ADL file? > \- Is ADL parser in openEHR site the only one to make use of it? > It does not make any real sense to make archetypes literally based on CEN 13606\. Archetypes have a very important requirement: to be targetted to an informatoin model which acts as a "base ontology"\. In openEHR we use the openEHR reference model fr this purpose\. This is what allows you to write an archetype for somehting like "Apgar result", which needs to use concepts like OBSERVATION \(with properties data, state and protocol\), HISTORY \(with properties events, origin\), EVENT \(property data\), and varous data structure types, like TREE, LIST, TABLE and SINGLE\. EN 13606 is not designed directly to support archetyping; it is designed as a lowest\-common denominator EHR data interoperability model, with support for transmitting archetyped information\. This is not the same as providing sufficient ontological definitoins to support the building or use of archetypes\. If you were to use EN13606 literally for archetypes, you could only use ENTRY, CLUSTER and ELEMENT; you will see that trying to define most clinical concepts with such a weak ontology will be annoying difficult, error\-prone, and ultimately will not engage clinical professionals\. So openEHR currently offers at least part of a base ontology for building archetypes, with concepts of sufficient strength to make higher\-level clinical concepts easily expressible\. In the near future, we intend to propose the creation of an agreed "base level ontology" reference model, expressed in UML, for use by everybody for buiulding archetypes\. We will include the core of the openEHR reference model for this \(from COMPOSITION down\); but we want other organisations to think about what they need to see in this\. There are other reference models such as the Danish G\-EPJ which have clean concepts which may need to be in this base ontology; also ENV 13940 \(continuity of care\) models need to be analysed for possible contributions\. We will propose this base ontology at the next CEN working group meeting\. I believe people will agree in principle\. A data mapping is also being defined between openEHR \(and later, the common base ontology\) and EN13606\. This wll enable 13606 to fulfull its purpose, which is to move data faithfully between EHR sites, including data which has been archetyped in those sites\. But please don't try to directly archteype 13606 information structures \- you will be going down he wrong route\! \- thomas beale --- ## Post #18 by @thomas.beale Rong Chen wrote: > Hi Rahil and Alfonso, > > We have developed an ADL parser that generates instance of archetype model\. The parser is based on javaCC and we use it to create archetypes for runtime use\. > > We plan to release it under open source license after our open source openehr kernel implementation is announced by openEHR together with new release of specifications\. The reason is that the parser has some dependency to the kernel code\. > > Best regards, > Rong in the next few days, so not too long to wait\! \- thomas --- ## Post #19 by @thomas.beale Gavin Brelstaff wrote: >> o generate a sensible XML\. If you are interested in doing some work on this we could collaborate\. > > There are some less heavy ways of doing XML rule checking that > avoid most of the irrational intricacies of the W3C Schema\. > Did you ever explore > Jim Clark's RelaxNG for schema validation of XML structures, > and > Schematron for rules involving Co\-occurance relationships\. > > That might be a way to go\. > our key requirement is that all schemas based on openEHR models are automatically generated from the source expressions, even if that is not literally true today\. We nearly have a tool finished which generates an expression of the models as UML\-2\.0 tagged XML \(but not XMI, which is bloated and qite hard to process\); this XML will be published as a live 'built product' of openEHR, and we encourage developers in the community to write the next level of converters which turn it into various concrete expressions including XML\-schema\. If RelaxNG and Schematron can be generated, al the better; I am aware that both have more power in constraint expression than XML\-schema, but leave it to the experts to work out the relative merits for openEHR\. As soon as we have published the X\-openEHR model tagged UML, you will be able to experiment\. \- thomas beale --- ## Post #20 by @thomas.beale David W\. Forslund wrote: > I've been looking at schematron for doing the "equivalent" of archetype in > a more general situation, particularly since there as been no ADL parser > available in Java\. Schematron seems to be reasonably popular for > enforcing rules for XML data structures and there is a variety of software > available for using it\. > there are currently two parsers in java, hopefully at least one of those will be very soon announced as open source\. The reference parser is also java\-wrapped, and I will upload both source and \.jar ASAP\. We are not quite up to speed with automatic building of these, apologies for the inconvenience\. \- thomas --- ## Post #21 by @thomas.beale Heath Frankel wrote: > Dear Sam, etal, > > I wonder if the specialised schema approach for archetypes is one that > openEHR should encourage\. Not so much discourage the investigation but at > least indicate to those who are going down this route that previous work by > Ocean and DSTC has indicated that the approach is not workable in a dual > layer model approach\. Perhaps the more useful task is to find a suitable > schema for ADL if this has not already been done for which archetype > definitions can be validated against, not instances\. > an XML\-schema for the Archetype Object Model will be available very soon, initially probably as a hand\-built one, but with the X\-openEHR specification converter, we will be able to generate schemas for the entire RM and AM from that\. > Perhaps it should be encouraged to use some existing schema's such as OWL > but again this is representing the archetype definition not the archetype > instance\. > OWL I think is still research in this area; it has very weak leaf level semantics \(which are known by the OWL community\); we are working with the experts including prof Alan Rector and Rahil Qamar at University of Manchester to understand better how to "do archetypes in OWL"\. > Perhaps, the DSTC approach to represent archetypes using XML with a XML > schema for the Archetype Model should be endorsed by openEHR if this is the > preferred approach so people don't waste their time and develop a > proliferation of approaches which are likely to be incompatible or at least > require translation\. > this is indeed the intended view, although I have recently come to the realisation that archetypes \(or more properly openEHR templates \- particular aggregations of archetypes\) can be used to generate XML\-schemas as well as XML\-instance; the former would be usable as message definitions, for those who love messages\. This would actually provide, for the first time, a single source development framework for software, schemas, screen definitions, and messages \- all obeying coherent, consistent reference model, archetypes, templates and teminologies\. > What would be better use of peoples time would be the investigation of an > archetype instance validating parser that uses the XML document representing > the archetype definition similar to an XML validating parser uses xml schema > \(which is also an XML document\)\. > this is indeed one thing that is needed; personaly, I would do it by reading in the archetype and the data from XML form into a DOM\-tree and jst using the kernel to do the work\. > The reason we need to have an XML document represent the archetype is > because of the dual layer model approach where the XML schema is used at the > reference model level and an xml instance can't have two associated schemas > for validation for each level\. However, from my understanding \(which is > limited\), this is not an issue in some of these other schema systems like > Schematron and RelaxNG, so it might be useful for people to investigate > these if they really want to represent archetypes as XML schema's but > knowing that traditional parsers and XML tools will not support this due to > the dual layer model approach\. > I also have suspicions that these other schema types might in fact be better for our purposes than XML\-schema, and I hope others might be able to provide expert input on this\. \- thomas --- ## Post #22 by @thomas.beale Linden H van der \(MI\) wrote: > Hi, > > without much knowledge of Schematron, I believe it is good for > expressing validation rules, but I wonder if it can actually be used to > express calculations, like the BMI or the Barthel Index \(sum of the > score of 10 values\)\. > > I'm currently looking at XQuery that can do such things\. > > Bye, Helma > perhaps the group is starting to see why we didn't use any of the XML technologies for archetypes in the first place\.\.\.\. \- thomas --- ## Post #23 by @Jose_Alberto_Maldona Hello, We have just read the message bellow and honestly we do not understand anything now\. We supposed that EN13606\-1 reference model could be used as reference model for developing archetypes\. You can read in prEN13606\-2 \(last version February 2005\), section 1\.3\. Communicating archetypes: "It is the intention of both CEN and HL7 that HL7 Templates and EN13606 archetypes be interoperable"\. One question arises are these EN13606 archetypes different from OPENEHR archetypes?\. Could you show some examples of clinical concepts that can not be expressed as archetypes derived from EN13606\-1 reference model?\. thanks in advance On dj, 2005\-03\-10 at 17:19, Thom Thomas Beale escribió: --- ## Post #24 by @Sam Jose Hi \- this is a difficult time with the 13606 standard about to hit the streets and the technology having been developed in the openEHR space\. The openEHR approach is now considerably richer than 13606 and will, we hope, be the development space\. You can do pretty much everything in 13606 that you can do in openEHR, BUT there is no standard way to express many things that have been shown to be worthwhile such as: A time series \- this will be lots of entries in 13606 The state \(e\.g\. patient sitting\) and protocol \(e\.g\. used wide cuff\) information \- this will clutter the data and make display rules difficult The openEHR work that is going on with instructions \- which will allow following a process and linking with workflow and decision support \- will have to be done with clusters and elements \- and it will not be sure how to do it exactly except to write it down\. So, we are hoping that people will look to the openEHR collaboration as the space to define clinical concepts and then generate 13606 archetypes for use with this standard \- rather than everyone going their own way\. Further, collaboration is required in this area \- it is difficult to get people working together but Thomas and others have put a huge effort into making this feasible\. I hope this is helpful\.\.\.\.\. Sam Heard --- ## Post #25 by @thomas.beale Jose Alberto Maldonado wrote: > Hello, > > We have just read the message bellow and honestly we do not understand > anything now\. We supposed that EN13606\-1 reference model could be used as > reference model for developing archetypes\. > You can read in prEN13606\-2 \(last version February 2005\), section 1\.3\. Communicating archetypes: "It is > the intention of both CEN and HL7 that HL7 Templates and EN13606 > archetypes be interoperable"\. well, this has been stated for a long time, but there is little evidence of it happening\. A recent post from the HL7 templates list indicates the current state of play\.\.\.in short they using something called MIF to do "templates", which are approximately the same as archetypes\. But it is complicated in HL7 because there are two ways to create any model of a clinical concept: using a template \(presuming they finish defining what they think a template is\) and using an RMIM \- a message model\. CEN doesn't need archetypes based on its own model, although not everyone in the working realises this yet\. However, I had a recent discussion with Dr Gunnar Klein \(chair of TC/251\) and he now understands the reason why basing archetypes literally on EN13606 does not make a lot of sense\. The documents you mention are indeed somewhat confusing as currenly worded and have to be changed; I will be recommending changes at the next CEN meeting\. > One question arises are these EN13606 > archetypes different from OPENEHR archetypes?\. > Could you show some examples of clinical concepts that can not be > expressed as archetypes derived from EN13606\-1 reference model?\. Sure\.\.\.\.practically every archetype we have built\. Have a look at the archetypes either using the adl\-workbench or jsut on the web \- see http://www.openehr.org/repositories/archetype-dev/latest/index.html. Consider the apgar archetype at http://www.openehr.org/repositories/archetype-dev/latest/adl/archetypes/openehr/ehr/entry/observation/openEHR-EHR-OBSERVATION.apgar.v1.html \- you will see it references classes OBSERVATION, HISTORY, EVENT, and LIST, and particular attributes, e\.g\. OBSERVATION has data, state and protocol \(see e\.g\. blood pressure for example use of these\)\. You can't write any of this using the CEN model because it just doesn't have any of the classes I just mentioned\. Instead, you can only write ENTRY, CLUSTER and ELEMENT, which is too limited\. CEN is designed to carry data that has already been archetyped, not to be a model on which archetypes are based\. > thanks in advance \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- HL7 templates list post \-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\- Lloyd McKenzie wrote: Hi John, The internal format of all HL7 v3 content is MIF\. It is used for persistence, exhange, as well as for definition of what's possible\. The MIF also acts as a UML profile expressing what pieces of UML HL7 permits and what stereotypes we require\. The MIF requires that all 'custom' constraints be expressed as OCL, though alternate formal \(e\.g\. Schematron\) or free text representations are also supported\. \(Obviously we're coming up short on OCL representations at present\.\) Thus, to a certain extent, the statement of UML \+ OCL is accurate\. We just need to make clear that the UML being referred to is the MIF LIM stereotype\. Also, the format for registration should be MIF XML to allow for easy validation and checking against other models \(e\.g\. RIM, datatypesn etc\.\) --- ## Post #26 by @system Hi, I'm only the convenor of the CEN/TC251 wg1\. For more detailed information you need to read the e\-mails by Dipak Kalra, Thomas Beale and Sam Heard\. In the text below soem comments\. --- ## Post #27 by @system Read the text below\. Gerard --- ## Post #28 by @thomas.beale Heath Frankel wrote: > Dear Sam, etal, > > I wonder if the specialised schema approach for archetypes is one that > openEHR should encourage\. Not so much discourage the investigation but at > least indicate to those who are going down this route that previous work by > Ocean and DSTC has indicated that the approach is not workable in a dual > layer model approach\. Perhaps the more useful task is to find a suitable > schema for ADL if this has not already been done for which archetype > definitions can be validated against, not instances\. > an XML\-schema for the Archetype Object Model will be available very soon, initially probably as a hand\-built one, but with the X\-openEHR specification converter, we will be able to generate schemas for the entire RM and AM from that\. > Perhaps it should be encouraged to use some existing schema's such as OWL > but again this is representing the archetype definition not the archetype > instance\. > OWL I think is still research in this area; it has very weak leaf level semantics \(which are known by the OWL community\); we are working with the experts including prof Alan Rector and Rahil Qamar at University of Manchester to understand better how to "do archetypes in OWL"\. > Perhaps, the DSTC approach to represent archetypes using XML with a XML > schema for the Archetype Model should be endorsed by openEHR if this is the > preferred approach so people don't waste their time and develop a > proliferation of approaches which are likely to be incompatible or at least > require translation\. > this is indeed the intended view, although I have recently come to the realisation that archetypes \(or more properly openEHR templates \- particular aggregations of archetypes\) can be used to generate XML\-schemas as well as XML\-instance; the former would be usable as message definitions, for those who love messages\. This would actually provide, for the first time, a single source development framework for software, schemas, screen definitions, and messages \- all obeying coherent, consistent reference model, archetypes, templates and teminologies\. > What would be better use of peoples time would be the investigation of an > archetype instance validating parser that uses the XML document representing > the archetype definition similar to an XML validating parser uses xml schema > \(which is also an XML document\)\. > this is indeed one thing that is needed; personaly, I would do it by reading in the archetype and the data from XML form into a DOM\-tree and jst using the kernel to do the work\. > The reason we need to have an XML document represent the archetype is > because of the dual layer model approach where the XML schema is used at the > reference model level and an xml instance can't have two associated schemas > for validation for each level\. However, from my understanding \(which is > limited\), this is not an issue in some of these other schema systems like > Schematron and RelaxNG, so it might be useful for people to investigate > these if they really want to represent archetypes as XML schema's but > knowing that traditional parsers and XML tools will not support this due to > the dual layer model approach\. > I also have suspicions that these other schema types might in fact be better for our purposes than XML\-schema, and I hope others might be able to provide expert input on this\. \- thomas --- ## Post #29 by @thomas.beale David W\. Forslund wrote: > I've been looking at schematron for doing the "equivalent" of archetype in > a more general situation, particularly since there as been no ADL parser > available in Java\. Schematron seems to be reasonably popular for > enforcing rules for XML data structures and there is a variety of software > available for using it\. > there are currently two parsers in java, hopefully at least one of those will be very soon announced as open source\. The reference parser is also java\-wrapped, and I will upload both source and \.jar ASAP\. We are not quite up to speed with automatic building of these, apologies for the inconvenience\. \- thomas --- ## Post #30 by @David_Forslund Schematron supports at least some calculations, but probably not elaborate ones\. I'm not sure what is needed here\. The sume of the score of 10 values is something that it can do: http://www.zvon.org/xxl/SchematronTutorial/Examples/Example13/example.html although I'm not sure about floating point \(which is added in XSL 2\.0, I believe\) Dave Linden H van der \(MI\) wrote: --- **Canonical:** https://discourse.openehr.org/t/adl-to-xml-schema/15565 **Original content:** https://discourse.openehr.org/t/adl-to-xml-schema/15565