2002/08/18 05:30:45
authormegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:12 +0000 (06:50 +0000)
committermegacz <megacz@xwt.org>
Fri, 30 Jan 2004 06:50:12 +0000 (06:50 +0000)
darcs-hash:20040130065012-2ba56-9beba3bf530edf7498ec92071f137f9981a22e5b.gz

CHANGES
src/org/xwt/Template.java

diff --git a/CHANGES b/CHANGES
index 3efe222..36b6ba7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
 
 17-Aug megacz Main.java: initial instantiation now happens in a background thread
 
+17-Aug megacz Template.java: fixed a bug that was keeping retheme() from working
+
 
index 6a8113e..f345718 100644 (file)
@@ -139,10 +139,12 @@ public class Template {
 
     // Methods to apply templates ////////////////////////////////////////////////////////
 
-    private Template() { } 
-    private Template(InputStream is, String nodeName) throws XML.SAXException, IOException {
+    private Template(String nodeName) {
         this.nodeName = nodeName;
         cache.put(nodeName, this);
+    }
+    private Template(InputStream is, String nodeName) throws XML.SAXException, IOException {
+        this(nodeName);
         new TemplateHelper().parseit(is, this);
     }
 
@@ -303,8 +305,7 @@ public class Template {
             if (t != b.template) retemplatize = true;
             b.template = t;
         }
-        if (b.template != null && b.template.changed)
-            retemplatize = true;
+        if (b.template != null && b.template.changed) retemplatize = true;
 
         if (retemplatize) {
 
@@ -526,8 +527,7 @@ public class Template {
                 nodeStack.addElement(t);
 
                 // instantiate a new node, and set its nodeName/importlist/preapply
-                Template t2 = new Template();
-                t2.nodeName = t.nodeName + "." + t.childvect.size();
+                Template t2 = new Template(t.nodeName + "." + t.childvect.size());
                 t2.importlist = t.importlist;
                 t2.startLine = line;
                 if (!name.equals("box")) t2.preapply = new String[] { name };