<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?>
<!--
# NeXus - Neutron and X-ray Common Data Format
# 
# Copyright (C) 2008-2020 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
-->
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" category="base"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
    name="NXroot" 
    type="group" extends="NXobject">
    <doc>Definition of the root NeXus group.</doc>
    <attribute name="NX_class">
        <doc>
            The root of any NeXus data file is an ``NXroot`` class 
            (no other choice is allowed for a valid NeXus data file).  
            This attribute cements that definition.
        </doc>
        <enumeration>
            <item value="NXroot"></item>
        </enumeration>
    </attribute>
    <attribute name="file_time">
        <doc>Date and time file was originally created</doc>
    </attribute>
    <attribute name="file_name">
        <doc>File name of original NeXus file</doc>
    </attribute>
    <attribute name="file_update_time">
        <doc>Date and time of last file change at close</doc>
    </attribute>
    <attribute name="NeXus_version">
        <doc>
            Version of NeXus API used in writing the file.
            
            Only used when the NAPI has written the file.
            Note that this is different from the version of the
            base class or application definition version number.
        </doc>
    </attribute>
    <attribute name="HDF_version">
        <doc>Version of HDF (version 4) library used in writing the file</doc>
    </attribute>
    <attribute name="HDF5_Version">
        <doc>
            Version of HDF5 library used in writing the file.
            
            Note this attribute is spelled with uppercase "V",
            different than other version attributes.
        </doc>
    </attribute>
    <attribute name="XML_version">
        <doc>Version of XML support library used in writing the XML file</doc>
    </attribute>
    <attribute name="h5py_version">
        <doc>Version of h5py Python package used in writing the file</doc>
    </attribute>
    <attribute name="creator">
        <doc>facility or program where file originated</doc>
    </attribute>
    <group type="NXentry" minOccurs="1" >
        <doc>entries</doc>
    </group>
    <attribute name="default">
        <doc>
            .. index:: plotting
            
            Declares which :ref:`NXentry` group contains 
            the data to be shown by default.
            It is needed to resolve ambiguity when 
            more than one :ref:`NXentry` group exists. 
            The value is the name of the default :ref:`NXentry` group.
            
            It is recommended (as of NIAC2014) to use this attribute
            to help define the path to the default dataset to be plotted.
            See http://wiki.nexusformat.org/2014_How_to_find_default_data
            for a summary of the discussion.
        </doc>
    </attribute>
</definition>

