# Path: suds/compat.py

# 
# Path: suds/xsd/sxbase.py
# class XBuiltin(SchemaObject):
#     """
#     Represents an (xsd) schema <xs:*/> node
#     """
# 
#     def __init__(self, schema, name):
#         """
#         @param schema: The containing schema.
#         @type schema: L{schema.Schema}
#         """
#         root = Element(name)
#         SchemaObject.__init__(self, schema, root)
#         self.name = name
#         self.nillable = True
# 
#     def namespace(self, prefix=None):
#         return Namespace.xsdns
# 
#     def builtin(self):
#         return True
# 
#     def resolve(self, nobuiltin=False):
#         return self


from logging import getLogger
from suds.compat import basestring
from suds.xsd.sxbase import XBuiltin
import suds.sax.date  as dt
import datetime
    """

    translation = (
        {
            '1': True,
            'true': True,
            '0': False,
            'false': False
        },
        {
            True: 'true',
            1: 'true',
            False: 'false',
            0: 'false'
        },
    )

    def translate(self, value, topython=True):
        if topython:
            if isinstance(value, basestring):
                return XBoolean.translation[0].get(value)
            else:
                return None
        else:
            if isinstance(value, (bool, int)):
                return XBoolean.translation[1].get(value)
            else:
                return value



# Path: suds/compat.py

# 
# Path: suds/xsd/sxbase.py
# class XBuiltin(SchemaObject):
#     """
#     Represents an (xsd) schema <xs:*/> node
#     """
# 
#     def __init__(self, schema, name):
#         """
#         @param schema: The containing schema.
#         @type schema: L{schema.Schema}
#         """
#         root = Element(name)
#         SchemaObject.__init__(self, schema, root)
#         self.name = name
#         self.nillable = True
# 
#     def namespace(self, prefix=None):
#         return Namespace.xsdns
# 
#     def builtin(self):
#         return True
# 
#     def resolve(self, nobuiltin=False):
#         return self


# Path: suds/xsd/sxbuiltin.py
from logging import getLogger
from suds.compat import basestring
from suds.xsd.sxbase import XBuiltin
import suds.sax.date  as dt
import datetime

    """

    translation = (
        {
            '1': True,
            'true': True,
            '0': False,
            'false': False
        },
        {
            True: 'true',
            1: 'true',
            False: 'false',
            0: 'false'
        },
    )

    def translate(self, value, topython=True):
        if topython:
            if isinstance(value, basestring):
                return XBoolean.translation[0].get(value)
            else:
                return None
        else:
            if isinstance(value, (bool, int)):
                return XBoolean.translation[1].get(value)
            else:
                return value



class XInteger(XBuiltin):