- c.keys[i] = c.keys[c.keys.length - 1];
- c.vals[i] = c.vals[c.vals.length - 1];
- i--;
- continue;
- }
- h.put(c.keys[i], c.vals[i]);
- }
- t.keys = new String[h.size()];
- t.vals = new Object[h.size()];
-
- Vec v = new Vec(h.size(), c.keys);
- v.sort(new Vec.CompareFunc() { public int compare(Object a, Object b) { return ((String)a).compareTo((String)b); } });
- for(int i=0; i<h.size(); i++) {
- if (c.keys[i].equals("thisbox")) {
- for(int j=i; j>0; j--) { t.keys[j] = t.keys[j - 1]; t.vals[j] = t.vals[j - 1]; }
- t.keys[0] = (String)v.elementAt(i);
- t.vals[0] = h.get(t.keys[0]);
- } else {
- t.keys[i] = (String)v.elementAt(i);
- t.vals[i] = h.get(t.keys[i]);
- }
+ continue ATTR;
+
+ case "id":
+ t.id = c.getAttrVal(i).toString().intern();
+ continue ATTR;
+ //#end
+
+ // treat value starting with '.' as resource reference
+ String uri = c.getAttrUri(i); if (!uri.equals("")) uri = '.' + uri;
+ keys.addElement(c.getAttrKey(i));
+ vals.addElement((c.getAttrVal(i).startsWith(".") ? uri : "") + c.getAttrVal(i));