+ /** Processes ${...} blocks in attributes, loads applicable
+ * attributes into the JS scope and processes global attributes. */
+ public static class AttributeEval extends JSLeaf.Element implements Tree.Attributes {
+ // TODO: hide global attributes from out() function. waiting on util.XMLHelper
+ protected Tree.Attributes a;
+
+ public AttributeEval(Tree.Element wrapped) {
+ super(wrapped);
+ a = wrapped.getAttributes();
+ wrapped.setAttributes(this);
+ }
+
+ public int getIndex(String q) { return a.getIndex(q); }
+ public int getIndex(String u, String k) { return a.getIndex(u, k); }
+ public String getKey(int i) { return a.getKey(i); }
+ public String getVal(int i) { return (String)eval(a.getVal(i)); }
+ public String getUri(int i) { return a.getUri(i); }
+ public String getPrefix(int i) { return a.getPrefix(i); }
+ public String getQName(int i) { return a.getQName(i); }
+ public int attrSize() { return a.attrSize(); }