Artifact [4b3acfd299]
Not logged in

Artifact 4b3acfd29943ed6850e7acca8b630618ee5cc062:

Attachment "Utilities-tcl.patch" to ticket [5c1b83898b] added by anonymous 2016-02-02 16:08:19.
--- Utilities.tcl.orig	2016-02-02 15:36:49.751902042 +0100
+++ Utilities.tcl	2016-02-02 16:59:18.056359612 +0100
@@ -1688,7 +1688,8 @@
     variable typeInfo
     variable simpleTypes
     variable options
-    variable standardAttributes
+    # "no such variable" - used :WS::Utils::standardAttributes instead
+    #variable standardAttributes
     variable currentNs
 
     if {!$options(UseNS)} {
@@ -1760,9 +1761,9 @@
             set itemXns {}
         }
         foreach key [dict keys $itemDef] {
-            if {[lsearch -exact $standardAttributes $key] == -1} {
+            if {[lsearch -exact $::WS::Utils::standardAttributes $key] == -1} {
                 lappend attrList $key [dict get $itemDef $key]
-                ::log::log debug "key = {$key} standardAttributes = {$standardAttributes}"
+                ::log::log debug "key = {$key} standardAttributes = {$::WS::Utils::standardAttributes}"
             }
         }
         ::log::log debug "\t\titemName = {$itemName} itemDef = {$itemDef} typeInfoList = {$typeInfoList} itemXns = {$itemXns} tmpInfo = {$tmpInfo} attrList = {$attrList}"
@@ -1786,7 +1787,7 @@
                     set resultValue {}
                     set dictList [dict keys [dict get $dict $useName]]
                     #::log::log debug "$useName <$dict> '$dictList'"
-                    foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                    foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                         if {[string equal $attr $valueAttr]} {
                             set resultValue [dict get $dict $useName $attr]
                         } elseif {[string match {::*} $attr]} {
@@ -1825,7 +1826,7 @@
                         set dictList [dict keys $row]
                         ::log::log debug "<$row> '$dictList'"
                         set resultValue {}
-                        foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                        foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                             if {[string equal $attr $valueAttr]} {
                                 set resultValue [dict get $row $attr]
                             } elseif {[string match {::*} $attr]} {
@@ -1863,7 +1864,7 @@
                     set dictList [dict keys [dict get $dict $useName]]
                     #::log::log debug "$useName <$dict> '$dictList'"
                     set resultValue {}
-                    foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                    foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                         if {$isAbstract && [string equal $attr {::type}]} {
                             set itemType [dict get $dict $useName $attr]
                             $retNode setAttributeNS "http://www.w3.org/2001/XMLSchema-instance" xsi:type $itemType
@@ -1909,7 +1910,7 @@
                         set dictList [dict keys $row]
                         set resultValue {}
                         #::log::log debug "<$row> '$dictList'"
-                        foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                        foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                             if {$isAbstract && [string equal $attr {::type}]} {
                                 set tmpType [dict get $row $attr]
                                 $retNode setAttributeNS "http://www.w3.org/2001/XMLSchema-instance" xsi:type $tmpType
@@ -2031,9 +2032,9 @@
         }
         set attrList {}
         foreach key [dict keys $itemDef] {
-            if {[lsearch -exact $standardAttributes $key] == -1} {
+            if {[lsearch -exact $::WS::Utils::standardAttributes $key] == -1} {
                 lappend attrList $key [dict get $itemDef $key]
-                ::log::log debug "key = {$key} standardAttributes = {$standardAttributes}"
+                ::log::log debug "key = {$key} standardAttributes = {$::WS::Utils::standardAttributes}"
             }
         }
         ::log::log debug "\t\titemName = {$itemName} itemDef = {$itemDef} typeInfoList = {$typeInfoList}"
@@ -2046,7 +2047,7 @@
                 if {$options(genOutAttr)} {
                     set dictList [dict keys [dict get $dict $itemName]]
                     set resultValue {}
-                    foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                    foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                         if {[string equal $attr $valueAttr]} {
                             set resultValue [dict get $dict $itemName $attr]
                         } elseif {[string match {::*} $attr]} {
@@ -2075,7 +2076,7 @@
                     if {$options(genOutAttr)} {
                         set dictList [dict keys $row]
                         set resultValue {}
-                        foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                        foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                             if {[string equal $attr $valueAttr]} {
                                 set resultValue [dict get $row $attr]
                             } elseif {[string match {::*} $attr]} {
@@ -2099,11 +2100,11 @@
                 ##
                 ## Non-simple non-array
                 ##
-                $parent appendChild [$doc createElement $itemName retnode]
+                $parent appendChild [$doc createElement $itemName retNode]
                 if {$options(genOutAttr)} {
                     set dictList [dict keys [dict get $dict $itemName]]
                     set resultValue {}
-                    foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                    foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                         if {$isAbstract && [string equal $attr {::type}]} {
                             set itemType [dict get $dict $useName $attr]
                             $retNode setAttributeNS "http://www.w3.org/2001/XMLSchema-instance" xsi:type $itemType
@@ -2123,7 +2124,7 @@
                 if {[llength $attrList]} {
                     ::WS::Utils::setAttr $retNode $attrList
                 }
-                convertDictToTypeNoNs $mode $service $doc $retnode $resultValue $itemType
+                convertDictToTypeNoNs $mode $service $doc $retNode $resultValue $itemType
             }
             {1 1} {
                 ##
@@ -2132,11 +2133,11 @@
                 set dataList [dict get $dict $itemName]
                 set tmpType [string trimright $itemType ()]
                 foreach row $dataList {
-                    $parent appendChild [$doc createElement $itemName retnode]
+                    $parent appendChild [$doc createElement $itemName retNode]
                     if {$options(genOutAttr)} {
                         set dictList [dict keys $row]
                         set resultValue {}
-                        foreach attr [lindex [::struct::set intersect3 $standardAttributes $dictList] end] {
+                        foreach attr [lindex [::struct::set intersect3 $::WS::Utils::standardAttributes $dictList] end] {
                             if {$isAbstract && [string equal $attr {::type}]} {
                                 set tmpType [dict get $row $attr]
                                 $retNode setAttributeNS "http://www.w3.org/2001/XMLSchema-instance" xsi:type $tmpType
@@ -2156,7 +2157,7 @@
                     if {[llength $attrList]} {
                         ::WS::Utils::setAttr $retNode $attrList
                     }
-                    convertDictToTypeNoNs $mode $service $doc $retnode $resultValue $tmpType
+                    convertDictToTypeNoNs $mode $service $doc $retNode $resultValue $tmpType
                 }
             }
             default {