- // push the last node we were in onto the stack
- nodeStack.addElement(t);
-
- // instantiate a new node, and set its fileName/importlist/preapply
- Template t2 = new Template(t.fileName);
- t2.startLine = getLine();
- if (!c.localName.equals("box"))
- t2.preapply.addElement((c.uri == null ? "" : (c.uri + ".")) + c.localName);
- // make the new node the current node
- t = t2;
-
- t.keys = new String[c.len];
- t.vals = new Object[c.len];
- Hash h = new Hash(c.len * 2, 3);
- for(int i=0; i<c.len; i++) {
- if (c.keys[i].endsWith(":image")) {
- String uri = c.urimap.get(c.keys[i].substring(0, c.keys[i].indexOf(':')));
- c.keys[i] = c.keys[i].substring(c.keys[i].lastIndexOf(':') + 1);
- c.vals[i] = uri + "." + c.vals[i];
- }
- if ((c.keys[i].equals("preapply") || c.keys[i].endsWith(":preapply")) && c.localName.equals("template")) {
- String uri = "";
- if (c.keys[i].endsWith(":preapply")) {
- uri = "." + c.urimap.get(c.keys[i].substring(0, c.keys[i].indexOf(':')));
- c.keys[i] = c.keys[i].substring(c.keys[i].lastIndexOf(':') + 1);
- }
- StringTokenizer tok = new StringTokenizer(c.vals[i].toString(), " ");
+ Vec keys = new Vec(c.getAttrLen());
+ Vec vals = new Vec(c.getAttrLen());
+
+ // process attributes into Vecs, dealing with any XML Namespaces in the process
+ ATTR: for (int i=0; i < c.getAttrLen(); i++) {
+ //#switch(c.getAttrKey(i))
+ case "preapply":
+ String uri = c.getAttrUri(i); if (!uri.equals("")) uri += ".";
+ StringTokenizer tok = new StringTokenizer(c.getAttrVal(i).toString(), " ");