private StringBuffer content = null; ///< during XML parsing, this holds partially-read character data; null otherwise
private int content_start = 0; ///< line number of the first line of <tt>content</tt>
private int startLine = -1; ///< the line number that this element starts on
- private final Res r; ///< the resource we came from
+ private final Stream r; ///< the resource we came from
// Static data/methods ///////////////////////////////////////////////////////////////////
- public static Template getTemplate(Res r) throws JSExn {
+ public static Template getTemplate(Stream r) throws JSExn {
try {
r = r.addExtension(".xwt");
if (r.t != null) return r.t;
}
}
- public static Res resolveStringToResource(String str, XWT xwt, boolean permitAbsolute) throws JSExn {
+ public static Stream resolveStringToResource(String str, XWT xwt, boolean permitAbsolute) throws JSExn {
// URL
if (str.indexOf("://") != -1) {
- if (permitAbsolute) return (Res)xwt.url2res(str);
+ if (permitAbsolute) return (Stream)xwt.url2res(str);
throw new JSExn("absolute URL " + str + " not permitted here");
}
// root-relative
- Res ret = xwt.rr;
+ Stream ret = xwt.rr;
while(str.indexOf('.') != -1) {
String path = str.substring(0, str.indexOf('.'));
str = str.substring(str.indexOf('.') + 1);
- ret = (Res)ret.get(path);
+ ret = (Stream)ret.get(path);
}
- ret = (Res)ret.get(str);
+ ret = (Stream)ret.get(str);
return ret;
}
// Methods to apply templates ////////////////////////////////////////////////////////
- private Template(Res r) {
+ private Template(Stream r) {
this.r = r;
String f = r.toString();
if (f != null && !f.equals(""))