# 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
                return XBoolean.translation[1].get(value)
            else:
                return value


class XInteger(XBuiltin):
    """
    Represents an (xsd) xs:int builtin type.
    """

    def translate(self, value, topython=True):
        if topython:
            if isinstance(value, basestring) and len(value):
                return int(value)
            else:
                return None
        else:
            if isinstance(value, int):
                return str(value)
            else:
                return value


class XLong(XBuiltin):
    """
    Represents an (xsd) xs:long builtin type.
    """

    def translate(self, value, topython=True):
        if topython:

# 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

                return XBoolean.translation[1].get(value)
            else:
                return value


class XInteger(XBuiltin):
    """
    Represents an (xsd) xs:int builtin type.
    """

    def translate(self, value, topython=True):
        if topython:
            if isinstance(value, basestring) and len(value):
                return int(value)
            else:
                return None
        else:
            if isinstance(value, int):
                return str(value)
            else:
                return value


class XLong(XBuiltin):
    """
    Represents an (xsd) xs:long builtin type.
    """

    def translate(self, value, topython=True):
        if topython:

            if isinstance(value, basestring) and len(value):