The following operations are supported. For a formal definition, please review the Service Description.

Web Service Links

Namespace Children of ::wsdb::types::aca::AttachmentByteSizeNumType

Namespace Code for ::wsdb::types::aca::AttachmentByteSizeNumType

namespace eval ::wsdb::types::aca::AttachmentByteSizeNumType {
    variable base xsd::integer
    variable decimalPointCanon {}
    variable fractionDigits 0
    variable minInclusive 0
    variable validate ::wsdb::types::aca::AttachmentByteSizeNumType::validate

}

Procedures in ::wsdb::types::aca::AttachmentByteSizeNumType


proc ::wsdb::types::aca::AttachmentByteSizeNumType::validate {
    value
    {errorListVar }
    {canonListVar }
} {
    variable base
    variable decimalPointCanon
    variable minInclusive
    variable fractionDigits

    if {"$errorListVar" ne ""} {
        upvar $errorListVar errorList
    }
    if {"$canonListVar" ne ""} {
        upvar $canonListVar canonList
    }

    set valid 0
    set collapsedValue [string trim $value]
    set errorList [list $collapsedValue]
    set canonList [list]

    if {![::wsdb::types::xsd::decimal::ifDecimalCanonize $value canonList $decimalPointCanon decimalList]} {
        lappend errorList "failed decimal test"
        return $valid
    }
    set foundDigits [lindex $decimalList 0]
    set foundFractionDigits [lindex $decimalList 1]
    set canonValue [join $canonList ""]

    while {1} {
        if {![::wsdb::types::${base}::validate $canonValue]} {
            lappend errorList "failed base test $base"
            break
        }
        if {$canonValue < 0} {
            lappend errorList "failed minInclusive test (0)"
            break
        }
        set valid 1
        break
    }

    return $valid
}