[Tkabber-dev] [tclxmpp] r114 committed - * Fixed bug with choosing new prefix.

codesite-noreply at google.com codesite-noreply at google.com
Sat Aug 1 01:46:21 MSD 2009


Revision: 114
Author: sgolovan
Date: Fri Jul 31 14:45:26 2009
Log: 	* Fixed bug with choosing new prefix.

http://code.google.com/p/tclxmpp/source/detail?r=114

Modified:
  /trunk/xmpp/xml.tcl

=======================================
--- /trunk/xmpp/xml.tcl	Fri Jul 31 12:44:21 2009
+++ /trunk/xmpp/xml.tcl	Fri Jul 31 14:45:26 2009
@@ -192,6 +192,10 @@
      set cdata  [lindex $xmldata 4]

      array set p $prefixes
+    set ps {}
+    foreach ns [array names p] {
+        lappend ps $p($ns)
+    }

      # Parsimoniously adding new prefixes (only when XMLNS is prepended
      # to an attribute).
@@ -208,7 +212,7 @@
              } elseif {[info exists p($axmlns)]} {
                  lappend newattrs $p($axmlns):$aattr $value
              } else {
-                set p($axmlns) [FindNewPrefix [array names p]]
+                set p($axmlns) [FindNewPrefix $ps]
                  lappend newattrs xmlns:$p($axmlns) $axmlns  
$p($axmlns):$aattr $value
              }
          } else {


More information about the Tkabber-dev mailing list