[NeXus-tech] NXvalidate

Akeroyd, Freddie (STFC,RAL,ISIS) freddie.akeroyd at stfc.ac.uk
Thu Aug 13 15:51:15 BST 2009


I've put some NXvalidate notes at

 

http://svn.nexusformat.org/code/trunk/applications/NXvalidate/README

 

You can run a validation of "NXentry v NXentry.xsd" and "NXentry v
NXmonopd.xsd entry" but until we sort out the NXmonopd inheritance from
NXentry I'm not sure what the latter means. There are also some schema
general validation errors to sort out, but the mechanism to try it is
now there at least

 

With regard to doing NXmonopd and other applications, i have implemented
validation by setting "xsi:type" in the XML file, so what an application
definition needs to do is inherit from NXentry and then do its stuff. As
NXentry is a dictionary of optional allowed terms, this would be
inheritance by restriction. In xsd if you "restrict" you have to list
all elements you inherit, even if you do not change the behaviour. To
make this easier for the user, we need to get the xslt to note what
elements are mentioned in the application definition, and then copy
across all the non-mentioned ones. This is probably rigorously correct,
but more complex to implement. It is "rigorous" as you could not refer
to an element in your NXmonopd what wasn't already mentioned in the
NXentry.

 

An easier, but less rigorous, way would be to inherit by "extends" -
make NXentry.xsd a blank abstract class and then add your stuff In
NXmonopd etc. This would however require another method to keep the
optional "dictionary" idea of NXentry

 

Pete, are you able to have a look at the xslt side? I think you
mentioned at the TC that you already did something like this for the doc
stuff - otherwise I can dig up the xslt I used to generate my tables for
NOBUGS when I get back (I'm away now until Tuesday) as that also walked
an inheritance tree.  

 

Regards,


Freddie

 

 

 


-- 
Scanned by iCritical.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nexusformat.org/mailman/private/nexus-tech/attachments/20090813/39920044/attachment.html 


More information about the NeXus-tech mailing list