[NeXus-tech] NXDL definition of "link"

freddie.akeroyd at stfc.ac.uk freddie.akeroyd at stfc.ac.uk
Wed Oct 20 19:22:07 BST 2010


Pete,

I think the example in the manual (which I guess came from the wiki) is
incorrect and no editing is actually required. In a NeXus XML instance
file the lines are actually:

<NXentry name="entry">

<NXinstrument name="instrument">
<NXdetector name="detector"> 
	<two_theta primary="1"
target="/entry/instrument/detector/two_theta" />
	<counts axes="two_theta" signal="1"
target="/entry/instrument/detector/counts" />
</NXdetector>
</NXinstrument>

<NXdata> 
	<NAPIlink target="/entry/instrument/detector/two_theta" />   
	<NAPIlink target="/entry/instrument/detector/counts" />
</NXdata>

</NXentry>

so the current definition of <link /> in NXDL fits in with this scheme.
Both a "link" and its associated "field" will have a target attribute in
a NeXus instance files, with the "target" of a true "field" always
pointing to itself. This is due to how links were done in HDF4 - all
linked items share the same attributes, so the item being linked to gets
a "target" from the NAPIlink and so looks like it is linking to itself
(this does however allow the original item path to be distinguished from
the link path as they would otherwise be indistinguishable in HDF4). In
HDF5 links are symbolic rather than hard and so "target" would not
automatically appear on the linked to field, but NeXus adds it for
compatibility.

Regards,

Freddie

> -----Original Message-----
> From: nexus-tech-bounces at nexusformat.org [mailto:nexus-tech-
> bounces at nexusformat.org] On Behalf Of Pete R. Jemian
> Sent: 20 October 2010 14:12
> Cc: NeXus Technical sub-committee list
> Subject: Re: [NeXus-tech] NXDL definition of "link"
> 
> Yes, it is a lot of editing.  With the XML editor we use, the changes
> are tractable since the editor will quickly identify an invalid NXDL
> instruction.  One concern I see is that there is a lot of information
> in
> the existing NXDL files that describe the intended target of the link.
> We should be able to preserve that somehow through this change.
> 
> The change is necessary since the rules as written do not authorize
the
> standard use of links in our existing NeXus data files.  See Example
> 2.2
> in the manual:
> 	http://download.nexusformat.org/doc/html/bk01ch02s02.html
> 
> The goal for NXDL is to define the rules we use in our NeXus data
> files,
> not to make new rules.  The Schema as written makes a new rule and
> leaves out the rule for something we have been doing.
> 
> Since the NXvalidate tool is still in alpha release, this change looks
> like normal work product but Freddie can tell us what is the scope of
> work to implement this change.
> 
> Pete
> 
> 
> On 10/20/2010 3:58 AM, Mark Koennecke wrote:
> > this is really  a lot of editing. Is the change necessary? Links to
> > whole groups are entirely possible.
> > I think that was also the rationale to make those links a separate
> > entity. The important bit is that it
> > works with the validation tool. So it is Freddies call really.
> 
> --
> ----------------------------------------------------------
>   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.
> -----------------------------------------------------------
> _______________________________________________
> NeXus-tech mailing list
> NeXus-tech at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus-tech
-- 
Scanned by iCritical.



More information about the NeXus-tech mailing list