- private void processBodyElement(XML.Element c) {
- // 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(), " ");
- while(tok.hasMoreTokens()) t.preapply.addElement(uri + tok.nextToken());
- continue;
+ if (!("ui".equals(c.getPrefix()) && "box".equals(c.getLocalName()))) {
+ String tagname = (c.getUri().equals("") ? "" : (c.getUri() + ".")) + c.getLocalName();
+ // GROSS hack
+ try {
+ t.prev = (Template)t.xwt.resolveString(tagname, false).call(null, null, null, null, 9999);
+ } catch (Exception e) {
+ Log.error(Template.class, e);