Check-in [57d9181a02]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More fixes for bug [a949d84bb5] -- Schema elements of xs:any not handled correctly.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:57d9181a021ffbbcaf6594da7d0df91a518bb872
User & Date: gerald 2013-05-28 18:48:13
Context
2013-05-28 21:20
Roll version numbers to 2.3.5. check-in: 596f9ffbe6 user: gerald tags: trunk
2013-05-28 18:48
More fixes for bug [a949d84bb5] -- Schema elements of xs:any not handled correctly. check-in: 57d9181a02 user: gerald tags: trunk
2013-05-27 23:46
Fix for bug [a949d84bb5] -- Schema elements of xs:any not handled correctly check-in: ac002ddf8b user: gerald tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

ClientSide.tcl became a regular file.

Changes to Utilities.tcl.

124
125
126
127
128
129
130

131
132
133
134
135
136
137
....
1426
1427
1428
1429
1430
1431
1432

1433



1434
1435
1436
1437
1438
1439
1440
....
1458
1459
1460
1461
1462
1463
1464

1465



1466
1467
1468
1469
1470
1471
1472
....
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
....
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
....
3174
3175
3176
3177
3178
3179
3180

3181
3182
3183
3184
3185
3186
3187
....
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
        parseInAttr 0
        genOutAttr 0
        valueAttrCompatiblityMode 1
        includeDirectory {}
        suppressNS {}
        useTypeNs 0
        nsOnChangeOnly 0

    }

    set ::WS::Utils::standardAttributes {
        baseType
        comment
        pattern
        length
................................................................................
            set isAbstract [dict get $typeInfo $mode $serviceName $partType abstract]
        }
        switch -exact -- $typeInfoList {
            {0 0} {
                ##
                ## Simple non-array
                ##

                set baseType [dict get $tmpTypeInfo base]



                if {$options(parseInAttr)} {
                    foreach attrList [$item attributes] {
                        lassign $attrList attr nsAlias nsUrl
                        if {[string equal $nsUrl $xsiNsUrl]} {
                            set attrValue [$item getAttribute ${nsAlias}:$attr]
                            dict set results $partName ::$attr $attrValue
                        } elseif {![string equal $nsAlias {}]} {
................................................................................
                    }
                }
            }
            {0 1} {
                ##
                ## Simple array
                ##

                set baseType [dict get $tmpTypeInfo base]



                set tmp {}
                foreach row $item {
                    if {$options(parseInAttr)} {
                        set rowList {}
                        foreach attrList [$row attributes] {
                            lassign $attrList attr nsAlias nsUrl
                            if {[string equal $nsUrl $xsiNsUrl]} {
................................................................................
                        } else {
                            lappend attrList $attr [dict get $dict $useName $attr]
                        }
                    }
                } else {
                    set resultValue [dict get $dict $useName]
                }
                if {[string equal [dict get $tmpInfo base] {XML}]} {
                    $retNode appendXML $resultValue
                } else {
                    $retNode appendChild [$doc createTextNode $resultValue]
                }
                if {[llength $attrList]} {
                    ::WS::Utils::setAttr $retNode $attrList
                }
................................................................................
                            } else {
                                lappend attrList $attr [dict get $row $attr]
                            }
                        }
                    } else {
                        set resultValue $row
                    }
                    if {[string equal [dict get $tmpInfo base] {XML}]} {
                        $retNode appendXML $resultValue
                    } else {
                        $retNode appendChild [$doc createTextNode $resultValue]
                    }
                    if {[llength $attrList]} {
                        ::WS::Utils::setAttr $retNode $attrList
                    }
................................................................................
#
###########################################################################
proc ::WS::Utils::partList {mode node serviceName dictVar tns {occurs {}}} {
    variable currentSchema
    variable unkownRef
    variable nsList
    variable defaultType

    upvar 1 $dictVar results

    set partList {}
    set middle [$node localName]
    ::log::log debug "Entering [info level 0] -- for $middle"
    switch -exact -- $middle {
        anyAttribute -
................................................................................
                    if {$isRef} {
                        ::log::log error "\t\t Was a reference.  Additionally information is:"
                        ::log::log error "\t\t\t part name is {$partName} type is {$partType} with {$partTypeInfo}"
                    }
                }
            }
            if {!$elementsFound} {
                set defaultType XML
                return
            }
        }
        complexContent {
            set contentType [[$node childNodes] localName]
            switch -exact -- $contentType {
                restriction {







>







 







>
|
>
>
>







 







>
|
>
>
>







 







|







 







|







 







>







 







|







124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
....
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
....
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
....
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
....
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
....
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
....
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
        parseInAttr 0
        genOutAttr 0
        valueAttrCompatiblityMode 1
        includeDirectory {}
        suppressNS {}
        useTypeNs 0
        nsOnChangeOnly 0
		anyType string
    }

    set ::WS::Utils::standardAttributes {
        baseType
        comment
        pattern
        length
................................................................................
            set isAbstract [dict get $typeInfo $mode $serviceName $partType abstract]
        }
        switch -exact -- $typeInfoList {
            {0 0} {
                ##
                ## Simple non-array
                ##
				if {[dict exists $tmpTypeInfo base]} {
					set baseType [dict get $tmpTypeInfo base]
				} else {
					set baseType string
				}
                if {$options(parseInAttr)} {
                    foreach attrList [$item attributes] {
                        lassign $attrList attr nsAlias nsUrl
                        if {[string equal $nsUrl $xsiNsUrl]} {
                            set attrValue [$item getAttribute ${nsAlias}:$attr]
                            dict set results $partName ::$attr $attrValue
                        } elseif {![string equal $nsAlias {}]} {
................................................................................
                    }
                }
            }
            {0 1} {
                ##
                ## Simple array
                ##
				if {[dict exists $tmpTypeInfo base]} {
					set baseType [dict get $tmpTypeInfo base]
				} else {
					set baseType string
				}
                set tmp {}
                foreach row $item {
                    if {$options(parseInAttr)} {
                        set rowList {}
                        foreach attrList [$row attributes] {
                            lassign $attrList attr nsAlias nsUrl
                            if {[string equal $nsUrl $xsiNsUrl]} {
................................................................................
                        } else {
                            lappend attrList $attr [dict get $dict $useName $attr]
                        }
                    }
                } else {
                    set resultValue [dict get $dict $useName]
                }
                if {[dict exists $tmpInfo base] && [string equal [dict get $tmpInfo base] {XML}]} {
                    $retNode appendXML $resultValue
                } else {
                    $retNode appendChild [$doc createTextNode $resultValue]
                }
                if {[llength $attrList]} {
                    ::WS::Utils::setAttr $retNode $attrList
                }
................................................................................
                            } else {
                                lappend attrList $attr [dict get $row $attr]
                            }
                        }
                    } else {
                        set resultValue $row
                    }
                    if {[dict exists $tmpInfo base] && [string equal [dict get $tmpInfo base] {XML}]} {
                        $retNode appendXML $resultValue
                    } else {
                        $retNode appendChild [$doc createTextNode $resultValue]
                    }
                    if {[llength $attrList]} {
                        ::WS::Utils::setAttr $retNode $attrList
                    }
................................................................................
#
###########################################################################
proc ::WS::Utils::partList {mode node serviceName dictVar tns {occurs {}}} {
    variable currentSchema
    variable unkownRef
    variable nsList
    variable defaultType
	variable options
    upvar 1 $dictVar results

    set partList {}
    set middle [$node localName]
    ::log::log debug "Entering [info level 0] -- for $middle"
    switch -exact -- $middle {
        anyAttribute -
................................................................................
                    if {$isRef} {
                        ::log::log error "\t\t Was a reference.  Additionally information is:"
                        ::log::log error "\t\t\t part name is {$partName} type is {$partType} with {$partTypeInfo}"
                    }
                }
            }
            if {!$elementsFound} {
                set defaultType $options(anyType)
                return
            }
        }
        complexContent {
            set contentType [[$node childNodes] localName]
            switch -exact -- $contentType {
                restriction {