Fixed wrong default value for xsd:positiveInteger and xsd:negativeInteger in xmlclass
authorLaurent Bessard
Mon, 29 Apr 2013 10:35:15 +0200
changeset 1078 f0ea86d830ed
parent 1077 df33bd06990a
child 1079 6c8dfc4fc23b
Fixed wrong default value for xsd:positiveInteger and xsd:negativeInteger in xmlclass
xmlclass/xsdschema.py
--- a/xmlclass/xsdschema.py	Mon Apr 29 10:24:19 2013 +0200
+++ b/xmlclass/xsdschema.py	Mon Apr 29 10:35:15 2013 +0200
@@ -2142,7 +2142,7 @@
         "extract": GenerateIntegerExtraction(minExclusive=0),
         "facets": DECIMAL_FACETS,
         "generate": GenerateSimpleTypeXMLText(str),
-        "initial": lambda: 0,
+        "initial": lambda: 1,
         "check": lambda x: isinstance(x, IntType)
     },
     
@@ -2152,7 +2152,7 @@
         "extract": GenerateIntegerExtraction(maxExclusive=0),
         "facets": DECIMAL_FACETS,
         "generate": GenerateSimpleTypeXMLText(str),
-        "initial": lambda: 0,
+        "initial": lambda: -1,
         "check": lambda x: isinstance(x, IntType)
     },