# Extracts validation against openEHR schema **Category:** [Implementers (archive)](https://discourse.openehr.org/c/implementers-archive/158) **Created:** 2012-01-17 10:55 UTC **Views:** 3 **Replies:** 3 **URL:** https://discourse.openehr.org/t/extracts-validation-against-openehr-schema/13037 --- ## Post #1 by @user1 I am trying to validate two openEHR EHR extracts against the openEHR schema but getting some errors. Here are the two Extracts: [http://miuras.inf.um.es/~researchehr/websvn/filedetails.php?repname=poseacle&path=%2Fextracts%2FAllergies%2Fallergies_openehr.xml](http://miuras.inf.um.es/%7Eresearchehr/websvn/filedetails.php?repname=poseacle&path=%2Fextracts%2FAllergies%2Fallergies_openehr.xml) [http://miuras.inf.um.es/~researchehr/websvn/filedetails.php?repname=poseacle&path=%2Fextracts%2FRegular+drugs%2Fregular-drugs-openehr.xml](http://miuras.inf.um.es/%7Eresearchehr/websvn/filedetails.php?repname=poseacle&path=%2Fextracts%2FRegular+drugs%2Fregular-drugs-openehr.xml) Can be found at this location: [http://miuras.inf.um.es/~researchehr/websvn/listing.php?repname=poseacle&path=%2Fextracts%2F#path_extracts_](http://miuras.inf.um.es/%7Eresearchehr/websvn/listing.php?repname=poseacle&path=%2Fextracts%2F#path_extracts_) And the schema against which I am validating the documents is available at: [http://www.openehr.org/releases/1.0.1/its/XML-schema/Extract.xsd](http://www.openehr.org/releases/1.0.1/its/XML-schema/Extract.xsd) And here is the tool I am using for validation: [http://tools.decisionsoft.com/schemaValidate/](http://tools.decisionsoft.com/schemaValidate/) Can someone tell me what is wrong with the extracts? I need a few valid openEHR extracts for my research. --- ## Post #2 by @system Hello, These extracts are not following the openEHR EXTRACT specifications. It seems they were generated with the LinkEHR Studio, that generates normalised data instance with a generic header but not the openEHR standard EXTRACT header. To generate it a post-processing step would be needed. The normalised openEHR data starts at /EXTRACTS/EXTRACT/data path. There you will see a element. If you copy that ... block to a new file and rename it as ... you should have a valid instance of openEHR data (valid against the COMPOSITION.xsd schema) without the extract header. David 2012/1/17 мυнαммα∂ αввαѕ <[08msitmuhammadabbas@seecs.edu.pk](mailto:08msitmuhammadabbas@seecs.edu.pk)> --- ## Post #3 by @user1 Thanks David. I tried your method and created the attached Extract. And have also merged the openEHR Extract schema into one file, but when I apply the validation, I still get an error. Could you help what is wrong with the XML files? 2012/1/17 David Moner <[damoca@gmail.com](mailto:damoca@gmail.com)> [details="(attachments)"] [Extract\_example.xml|attachment](upload://2mqozPWS7jQE2cf3W9Ehox9DMG9.xml) (1.29 KB) [openEHRExtract.xsd|attachment](upload://wHYRWucnsmKErS4J5aQoJb63Hbm.xsd) (38.5 KB) [/details] --- ## Post #4 by @system Hello, I'm very sorry, but I think there is nothing to de here. I have checked the xml and it seems that it was generated using an XML Schema dated in 2006, completely outdated now. So there are too many changes to be solved by hand. David 2012/1/18 мυнαммα∂ αввαѕ <[08msitmuhammadabbas@seecs.edu.pk](mailto:08msitmuhammadabbas@seecs.edu.pk)> --- **Canonical:** https://discourse.openehr.org/t/extracts-validation-against-openehr-schema/13037 **Original content:** https://discourse.openehr.org/t/extracts-validation-against-openehr-schema/13037