X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2FTemplate.java;h=c7a9acbda8a55c4e8392559ed17369fe6ceb2431;hb=5de2077b86a41f6debd45ca1dd71666bf78b3975;hp=ed91cd3e572ce46341563178c803a013fe09beff;hpb=db19c351a5a1e3ca8a817463baaa5bf6ea2cfe6b;p=org.ibex.core.git diff --git a/src/org/ibex/Template.java b/src/org/ibex/Template.java index ed91cd3..c7a9acb 100644 --- a/src/org/ibex/Template.java +++ b/src/org/ibex/Template.java @@ -81,6 +81,7 @@ public class Template { PerInstantiationScope pis = new PerInstantiationScope(b, ibex, parentPis, staticScope); for(int i=0; i", XML.Exn.SCHEMA, getLine(), getCol()); if (c.getAttrLen() != 0) throw new XML.Exn("root element must not have attributes", XML.Exn.SCHEMA, getLine(), getCol()); - if (c.getUri("ui") == null) c.addUri("ui", "ibex://ui"); - if (c.getUri("") == null) c.addUri("", initial_uri); + if (c.getUri("ui") == null || "".equals(c.getUri("ui"))) c.addUri("ui", "ibex://ui"); + if (c.getUri("meta") == null || "".equals(c.getUri("meta"))) c.addUri("meta", "ibex://meta"); + if (c.getUri("") == null || "".equals(c.getUri(""))) c.addUri("", initial_uri); state = STATE_IN_ROOT_NODE; return; case STATE_IN_ROOT_NODE: - if ("ibex://meta".equals(c.getUri())) { state = STATE_IN_META_NODE; meta = 0; return; } + if ("ibex://meta".equals(c.getUri())) { + state = STATE_IN_META_NODE; meta = 0; return; + } state = STATE_IN_TEMPLATE_NODE; t = (t == null) ? new Template(ibex) : new Template(t, getLine()); break; @@ -214,8 +218,10 @@ public class Template { while(uriEnumeration.hasMoreElements()) { String key = (String)uriEnumeration.nextElement(); String val = (String)urimap.get(key); + if (val.equals("ibex://ui")) continue; + if (val.equals("ibex://meta")) continue; t.urikeys[ii] = key; - if (val.charAt(0) == '.') val = val.substring(1); + if (val.length() > 0 && val.charAt(0) == '.') val = val.substring(1); t.urivals[ii] = val; ii++; }