2003/12/29 22:29:31
[org.ibex.core.git] / src / org / xwt / Template.java
index 00aedd0..a5a9661 100644 (file)
@@ -49,12 +49,12 @@ public class Template {
     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;
@@ -65,28 +65,28 @@ public class Template {
         }
     }
 
-    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(""))