sync
[app.Builder.js] / JsRender / NodeToJs.vala
index d9dc4eb..9826e3e 100644 (file)
@@ -35,11 +35,19 @@ public class JsRender.NodeToJs : Object {
        {
                //return this.mungeToString(this.node);
 
+       
+               
                this.checkChildren();
                this.readProps();
                this.readArrayProps();
                this.readListeners();
-               this.iterChildren();
+
+               if (!this.node.props.has_key("* xinclude")) {
+                       this.iterChildren();
+               }
+               
+               
+               
                
                if (this.els.size < 1) {
                        return "";
@@ -49,10 +57,18 @@ public class JsRender.NodeToJs : Object {
                var spad = pad.substring(0, this.pad.length-4);
                var str_props = gLibStringListJoin(",\n" + this.pad , this.els) ;
                //print ("STR PROPS: " + str_props);
-               
-               return   "{\n" +
-                       this.pad  + str_props + 
-                       "\n" + spad +  "}";
+               if (!this.node.props.has_key("* xinclude")) {
+                       return   "{\n" +
+                               this.pad  + str_props + 
+                               "\n" + spad +  "}";
+               }
+               // xinclude...
+
+
+               return "Roo.apply(" + this.node.props.get("* xinclude") + "._tree(), "+
+                        "{\n" +
+                               this.pad  + str_props + 
+                               "\n" + spad +  "})";
                     
        } 
 
@@ -182,6 +198,14 @@ public class JsRender.NodeToJs : Object {
        {
                string left;
                Regex func_regex ;
+
+               if (this.node.props.has_key("$ xns")) {
+        
+                       this.els.add("'|xns' : '" + this.node.props.get("$ xns") + "'");
+
+               }
+
+               
                try {
                        func_regex = new Regex("^\\s+|\\s+$");
                } catch (Error e) {
@@ -405,7 +429,11 @@ public class JsRender.NodeToJs : Object {
 
                // finally output listeners...
                
-       
+       public void xIncludeToString()
+       {
+               
+
+       }
 
 }