# NeXus - Neutron and X-ray Common Data Format # # Copyright (C) 2008-2012 NeXus International Advisory Committee (NIAC) # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # For further information, see http://www.nexusformat.org ########### SVN repository information ################### # $LastChangedDate$ # $LastChangedAuthor: Pete Jemian $ # $LastChangedRevision$ # $HeadURL$ ########### SVN repository information ################### This file provides basic information for validating NeXus data files (but not NXDL), including: * Basic data types (NX_FLOAT32, ISO8601 etc.) are all defined in NeXus.xsd along with enumerations such as nxsd:validShape * Base classes are each defined in a separate NXDL file (e.g. base_classes/NXentry.xxdl.xml) These files are constructed using the rules of NXDL. * Instrument and application definitions are created in separate NXDL files * Some object-orientated features have been added as they make definition writing easier and avoid duplication. For example: - an abstract NXchopper.xsd has been created that is inherited by NXdisc_chopper.xsd and NXfermi_chopper.xsd - all NeXus object inherit from nxsd:classBaseType (it just has a "name" attribute that all classes have) - beamline components inherit from nxsd:componentType that contains "distance" and NXgeometry members etc. Used for allowed names of elements and attributes. Need to be restricted to valid program variable names. Note: This means no "-" or "." characters can be allowed and you cannot start with a number. HDF4 had a 64 character limit on names (possibly including NULL) and NeXus enforces this via the NX_MAXNAMELEN variable. This is a valid link target - currently it must be an absolute path made up of valid names with / character separating, but we may want to consider allowing ".." at some point. Must also consider use of name attribute in resolving link targets. /NXentry/NXinstrument/analyzer:NXcrystal/ef /NXentry/NXinstrument/monochromator:NXcrystal/ei /NX_other The HDF5 documentation (http://www.hdfgroup.org/HDF5/doc/UG/UG_frame09Groups.html) says "Note that relative path names in HDF5 do not employ the ../ notation, the UNIX notation indicating a parent directory, to indicate a parent group." Thus, if we only consider the case of class[:name] (/[a-zA-Z_][\w_]*(:[a-zA-Z_][\w_]*)?)+ Note that HDF5 also permits relative path names, such as: GroupA/GroupB/Dataset1 but this is not permitted in the pattern below. Used for allowed names of NX class types (e.g. NXdetector) not the instance (e.g. bank1) which is covered by validItemName. NX_FLOAT32 NX_FLOAT