[Nexus-developers] link targets with same name in one group

Mark Koennecke Mark.Koennecke at psi.ch
Thu Jul 21 13:08:27 BST 2005


High everyone,

Hartmut Gilde wrote:

>hi mark,
>
>thanks for replying.
>see my annotations below your text ...
>
>
>  
>
>>>question:
>>>its not possible to create two links (in the same group) whose target sds
>>>have different locations but the same name, right ?
>>>
>>>i encountered that behaviour when creating NeXus-Files conforming to the
>>>NXmononxref.xml definition from Paul, where in the NXdata group exist two
>>>links: one to /NXentry/timer/data and another one to NXentry/monitor/data.
>>>      
>>>
I finally found time to look into this. I wrote a little program 
(attached) for testing double
linking. I found that it works for HDF4 and XML. Though the content of 
the group IS
confusing with two items with the same name and only the link target 
attribute telling
you what is what. With HDF5, however, no second link is created, i.e. it 
fails. This is a
limitation of HDF5. HDF5 internally works with path strings: i.e. you link
/cucumber/bending_ration against tata/bending_ratio. This does not work 
for the  same reason
why you cannot have a link in a unix file system point to two things at 
the same time.

I suggest to augment our rules to require  more qualified names in cases 
where such linking
conflicts exist. For example, in the  TAS DTD,  analyzer/energy would become
analyzer/analyzer_energy  and monochromator/energy would become
monochromator/monochromator_energy in order to avoid the link conflict 
in NXdata.
This makes things much clearer in the NXdata group anyway even in the 
HDF4 and XML
cases.

                           
                                                                     Mark


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hartmut.c
Type: text/x-c
Size: 967 bytes
Desc: not available
Url : http://lists.nexusformat.org/pipermail/nexus-developers/attachments/20050721/72ed3ca3/attachment.bin 


More information about the NeXus-developers mailing list