When we get the Digital DR up and running, it's going to be important to have easy tools for the users to validate the XML documents before they get archived. We plan on storing everything in the eXist XML database. One would assume that it has validation functionality, but let's make sure:

eXist docs show that there are a couple of xquery validation functions available. So let's try them out in the XQuery Sandbox:

validation:validate-report("/db/geospatial/20090724.gpx")
yields:

<report>
  <status>valid</status>
  <namespace>http://www.topografix.com/GPX/1/0</namespace>
  <time>107</time>
</report>

What gets returned for a document that does not validate? I attempted to upload a bogus document (a gpx track where I had thrown in an undefined element). The web page didn't give an error, but it just showed a blank page and when you navigate back to the collection the bogus document was not there. So it seems that eXist simply will not let you load invalid documents. I suppose that this is good.

Perhaps we should have the users validate instance documents in oXygen or some other XML editor before trying to load them?




blog comments powered by Disqus

Published

03 August 2009

Category

work

Tags