[NeXus-tech] NXvalidate

Pete R. Jemian prjemian at gmail.com
Fri Aug 14 21:18:52 BST 2009


It's going to take a bit of refreshing to see how to implement these rules in XSLT.
I'll start but I've got some work which is competitive for my limited brain power.

Pete

Akeroyd, Freddie (STFC,RAL,ISIS) wrote:
> 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.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> NeXus-tech mailing list
> NeXus-tech at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus-tech

-- 
----------------------------------------------------------
  Pete R. Jemian, Ph.D.                <jemian at anl.gov>
  Beam line Controls and Data Acquisition, Group Leader
  Advanced Photon Source,   Argonne National Laboratory
  Argonne, IL  60439                   630 - 252 - 3189
-----------------------------------------------------------
     Education is the one thing for which people
        are willing to pay yet not receive.
-----------------------------------------------------------


More information about the NeXus-tech mailing list