Hi all
I am currently working on RAD-334. MrrtReportTemplates should be validated before importing them. The validation rules are specified by the MRRT standards here, http://www.ihe.net/uploadedFiles/Documents/Radiology/IHE_RAD_Suppl_MRRT.pdf.
The idea here is to validate it using xsd. Here is a commit of the current work I’ve done. According to the standard on page 33 of the doc above, exactly 1 meta tag should have the ‘charset’ attribute specifying the character set to use. There are other ‘meta’ elements that have other attributes but only one should have the charset. Apparently that cannot be made possible with xsd 1.0 only in xsd 1.1. But standard java does not support xsd 1.1. In my commit I used a valid template according to the mrrt standard but I had to comment out this line for it to work. As it is not possible to enforce that only one element have a particular attribute in xsd 1.0. The only two libraries I could find was xerces and saxon. The only version of xerces that supports xsd 1.1 is Xerces2 Java 2.11.0 (XML Schema 1.1) (Beta). But unfortunately it does not have an official maven repo. You’ll have to download the zip and install it to your local maven repo. Which is not a good idea. Also saxon has a tight license. The version of saxon that supports xsd 1.1 is not free, also not appropriate for us. So me and @teleivo would love some input from the community on how to tackle this. Maybe there is something we missed.
Update: You can look at this question I asked on stackoverflow to understand fully the problem am trying to solve, http://stackoverflow.com/questions/38763927/validating-the-same-field-multiple-times-with-different-attributes-using-xsd