XMLDataIOStyle readObj = null;
       public Object action (SaxDocumentHandler handler, Attributes attrs) {          // save these for later, when we know what kind of dataIOstyle we got          // Argh we really need a clone on Attributes. Just dumb copy for now.          DataIOStyleAttribs.clear(); // all old values cleared          DataIOStyleAttribs = attribListToHashtable(attrs);          // clear out the format command object array          // (its used by Formatted reads only, but this is reasonable           //  spot to do this).          CurrentFormatObjectList = new ArrayList ();          // this will be used in formatted/delimited reads to          // set the iteration order of the locator that will populate          // the datacube           AxisReadOrder = new ArrayList();          //  If there is a reference object, clone it to get          //  the new readObj          String readIdRef = (String) DataIOStyleAttribs.get("readIdRef");          if (readIdRef != null) {             XMLDataIOStyle readObj = null;             if (ReadObj.containsKey(readIdRef)) {                XMLDataIOStyle refReadObj = (XMLDataIOStyle) ReadObj.get(readIdRef);                try {                   readObj = (XMLDataIOStyle) refReadObj.clone();                } catch (java.lang.CloneNotSupportedException e) {                   Log.errorln("Weird error, cannot clone XMLDataIOStyle (read node) object. Aborting read.");                   System.exit(-1);                }                // override attrs with those in passed list                readObj.hashtableInitXDFAttributes(DataIOStyleAttribs);                // give the clone a unique Id and remove IdRef                 readObj.setReadId(findUniqueIdName(ReadObj, readObj.getReadId()));                readObj.setReadIdRef(null);                // add this into the list of Read objects                ReadObj.put(readObj.getReadId(), readObj);                // we need to put in the local axes refs here, not use cloned ones                // otherwise, references will be all screwy and nothing will work for                // adding/getting data :). I suppose we should somehow put this code                // inside the clone method of the readObject, but its difficult to do,                 // as well questionable utility.                 ArrayList newAxisOrderList = new ArrayList();                Iterator iter = CurrentArray.getAxes().iterator();                while (iter.hasNext()) {                   AxisInterface arrayAxisObj = (AxisInterface) iter.next();                   String refAxisId = (String) AxisAliasId.get(arrayAxisObj.getAxisId());                    Iterator iter2 = readObj.getIOAxesOrder().iterator();                   while (iter2.hasNext()) {                      AxisInterface readAxisObj = (AxisInterface) iter2.next();                      if (readAxisObj.getAxisId().equals(refAxisId)) {                          newAxisOrderList.add(arrayAxisObj);                          break; // got a match, go to next axis object                       }                    }                }                // now set the new IO Axes order with correct axis refs                 readObj.setIOAxesOrder(newAxisOrderList);             } else {                Log.warnln("Error: Reader got a read node with ReadIdRef=\""+readIdRef+"\"");                Log.warnln("but no previous read node has that id! Ignoring add request.");                return (Object) null;             }             // add read object to Current Array             CurrentArray.setXMLDataIOStyle(readObj);              // clear attrib table since we cloned to get values              DataIOStyleAttribs.clear();             CurrentFormatObjectList.add(readObj);          }          return (Object) null;       }