xmlclass/xsdschema.py
changeset 1852 70c1cc354a8f
parent 1849 6811021e3d94
child 1853 47a3f39bead0
equal deleted inserted replaced
1851:1b8b5324506c 1852:70c1cc354a8f
    48             text += "</%s>\n" % name
    48             text += "</%s>\n" % name
    49         return text
    49         return text
    50     return generateXMLTextMethod
    50     return generateXMLTextMethod
    51 
    51 
    52 
    52 
    53 def GenerateFloatXMLText(extra_values=[], decimal=None):
    53 def GenerateFloatXMLText(extra_values=None, decimal=None):
    54     float_format = (lambda x: "{:.{width}f}".format(x, width=decimal).rstrip('0')
    54     float_format = (lambda x: "{:.{width}f}".format(x, width=decimal).rstrip('0')
    55                     if decimal is not None else str)
    55                     if decimal is not None else str)
       
    56     extra_values = [] if extra_values is None else extra_values
    56 
    57 
    57     def generateXMLTextMethod(value, name=None, indent=0):
    58     def generateXMLTextMethod(value, name=None, indent=0):
    58         text = ""
    59         text = ""
    59         if name is not None:
    60         if name is not None:
    60             ind1, _ind2 = getIndent(indent, name)
    61             ind1, _ind2 = getIndent(indent, name)