[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kupu-checkins
Subject:    [kupu-checkins] r58437 - kupu/trunk/kupu/common
From:       mihxil () codespeak ! net
Date:       2008-09-25 15:36:23
Message-ID: 20080925153623.B92F516A0C0 () codespeak ! net
[Download RAW message or body]

Author: mihxil
Date: Thu Sep 25 17:36:23 2008
New Revision: 58437

Modified:
   kupu/trunk/kupu/common/kupudrawers.js
Log:
rolled back my change of earlier today about xsltproc.setParameter. I think the \
problem is not here, but in the XSL. It probably simply does not make sense to define \
a default value, it only obfuscates.

Modified: kupu/trunk/kupu/common/kupudrawers.js
==============================================================================
--- kupu/trunk/kupu/common/kupudrawers.js	(original)
+++ kupu/trunk/kupu/common/kupudrawers.js	Thu Sep 25 17:36:23 2008
@@ -666,18 +666,7 @@
     };
 
 
-    /**
-     * In this file empty values are used which are supposed to mean 'not \
                explicitely set'.
-     * In that case the XSL parameter should not explicitely set as parameter on the \
                transformation, otherwise, the implicit default value
-     * as defined in the XSL will not be used.
-     *
-     * Certainly true for 'showupload', which has a default //libraries/showupload, \
                should probably also used for other parameters.
-    */
-    this.setXslParameter = function(xsltproc, ns, name, value) {
-        if (value && ! "" == value) {
-            xsltproc.setParameter(ns, name, value);
-        }
-    }
+
 
     /*** bootstrapping ***/
 
@@ -701,7 +690,7 @@
             xsltproc.setParameter("", "ie", this.editor.getBrowserName() == 'IE');
             xsltproc.setParameter("", "drawertype", this.drawertype);
             xsltproc.setParameter("", "drawertitle", this.drawertitle);
-            this.setXslParameter(xsltproc, "", "showupload", this.showupload);
+            xsltproc.setParameter("", "showupload", this.showupload);
             xsltproc.setParameter("", "showanchors", this.showanchors);
             if (this.target !== undefined) {
                 xsltproc.setParameter("", "link_target", this.target);
@@ -817,7 +806,7 @@
             xsltproc.setParameter("", k, this.options[k]);
         }
         xsltproc.setParameter("", "multiple", this.multiple ? "yes" : "");
-        this.setXslParameter(xsltproc, "", "showupload", this.showupload)
+        xsltproc.setParameter("", "showupload", this.showupload ? "yes" : "");
         xsltproc.setParameter("", "showanchors", this.showanchors);
 
         var doc = this._transformXml();
_______________________________________________
kupu-checkins mailing list
kupu-checkins@codespeak.net
http://codespeak.net/mailman/listinfo/kupu-checkins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic