dot in flattened attribute names

David Wojtowicz davidw at uiuc.edu
Thu May 18 12:17:01 PDT 2006


Hi James,

 

 Remember the stuff I had got involved with in libnc_dap concerning the
handling of DODS strings, and associated containerized attributes in the
libnc library?    I finally got around to switching my own use of the
library from my privately patched version to the current SVN version that
had incorporated the changes with your enhancements to them.

 

 I've discovered a problem.   the code in transfer_attributes_to_list in
nc_util.c, which is part of the attribute, flattening process uses a "." to
append the attribute name to it's parent container name to produce the
flattened attribute name.    However AttrTable::find in libdap/AttrTable.cc
interprets the "." to be a reference to an actual container rather than a
dot in the attribute name, which is the case after flattening.  This means
that AttrTable::find and everything that uses it to find attributes, can't
find the flattened attributes.    I had worked around this in my code by
using ":" as the separator, but I understand why you changed it to be
constant with the dot notation used elsewhere.

 

The basic symptom of this is running dncdump against the TDS where there are
containerized attributes presented.  It just crashes. 

 

One possible fix is going back to the ":" 

 

Another is to replace most of the calls to AttrTable::find() in Dattr.cc,
NCConnect.cc, with calls to an alternate version of find() that doesn't
apply special meaning to the dots.  Simple_find() comes to mind, but it's
private and the arg list is set up differently.   

 

I think I had opted for the ":" when I did my version of the patch because I
was trying to not have to patch anything in libdap itself. 

 

 

-----
David Wojtowicz, Sr. Research Programmer, Sysadmin
Dept of Atmospheric Sciences / Computer Services
University of Illinois at Urbana-Champaign
davidw at uiuc.edu  (217) 333-8390

 



More information about the Opendap-tech mailing list