}
public static JS resolveStringToResource(String str, XWT xwt, boolean permitAbsolute) throws JSExn {
- // URL
- /* FIXME
if (str.indexOf("://") != -1) {
if (permitAbsolute) return (Stream)xwt.url2res(str);
throw new JSExn("absolute URL " + str + " not permitted here");
}
- */
// root-relative
JS ret = (JS)xwt.getAndTriggerTraps("");
while(str.indexOf('.') != -1) {
if (id != null) parentPis.putDollar(id, b);
for(int i=0; i<preapply.size(); i++) {
- Template t = new Template(Stream.getInputStream(resolveStringToResource((String)preapply.elementAt(i), xwt, false)), xwt);
- if (t == null) throw new RuntimeException("unable to resolve resource " + preapply.elementAt(i));
- t.apply(b);
+ JS templateFunc = resolveStringToResource((String)preapply.elementAt(i), xwt, false);
+ templateFunc.call(b, null, null, null, 1);
}
PerInstantiationJSScope pis = new PerInstantiationJSScope(b, xwt, parentPis, staticScope);