Thanks for the pointer, Bob, and thanks for XSLT pointers yesterday. Saved me lots of time and sanity.
Further validation is going to be done in code, though. -Darius On Tue, Aug 9, 2011 at 2:10 AM, Bob Jolliffe <[email protected]> wrote: > Hi Darius > > If you are thinking of validating the xml beyond simple schema > validation - ie testing for correctness of "business" rules - you > might want to look at schematron (http://www.schematron.com/) for > this. Schematron allows you to express a series of assertions about > the xml document as xpath tests in a standard and declarative way. > This seems like the right tool for doing the sort of validation you > want to do here. > > Cheers > Bob > > On 9 August 2011 07:34, Darius Jazayeri <[email protected]> wrote: > > Hi All, > > I'm working on the ability to let 1.6 OpenMRS installations upload their > > concepts to the OCC, and as a result I'm re-implementing some of the > scripts > > and validators Wyclif wrote to upgrade concepts from 1.6 to 1.7 (because > I > > need them to work on XML rather than on a SQL database). > > Background: there are concepts that validate as being "okay" in 1.6, that > > are no longer okay after you upgrade to 1.7. For example you might have a > > concept with multiple preferred names, since we were never validating > this > > or properly showing it in the UI until 1.7. > > I'm definitely going to put a safeguard in place that if you upload such > a > > concept from 1.6 to the OCC, it won't actually be accepted. I'm wondering > if > > we want to force people to do some additional cleaning up of concepts > while > > we're at it. > > Presumably that would mean writing a module to inspect a 1.6 > installation's > > concept dictionary with stricter validation, and a page the explicitly > shows > > all a concept's names with their tags and locales. Another thing I notice > > Wyclif's 1.6-to-1.7 scripts do is automatically assign a fully-specified > > name for every concept, but we could instead push people to do this > > manually. > > Any thoughts about this from concept managers? > > -Darius > > PS- Arbitrarily my test case was to upload the CLINIC TRAVEL TIME and > WEIGHT > > IN KG concepts from the MVP dictionary. The weight concept actually > failed > > the (strict) validation I wrote because while it has a short name ("WT") > and > > names in en, rw, sw x2, fr, es, ti, none of its names are explicitly > marked > > as "preferred". > > ________________________________ > > Click here to unsubscribe from OpenMRS Developers' mailing list > > _________________________________________ > > To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to > [email protected] with "SIGNOFF openmrs-devel-l" in the body > (not the subject) of your e-mail. > > [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l] > _________________________________________ To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [email protected] with "SIGNOFF openmrs-devel-l" in the body (not the subject) of your e-mail. [mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

