diff -r b112bfdde5cc -r 5b6ad7a7fd9d xmlclass/xsdschema.py --- a/xmlclass/xsdschema.py Sat Aug 19 21:06:54 2017 +0300 +++ b/xmlclass/xsdschema.py Mon Aug 21 21:55:18 2017 +0300 @@ -79,9 +79,9 @@ "fractionDigits", "length", "minLength", "maxLength"] -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Structure reducing functions -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # Documentation elements @@ -803,7 +803,7 @@ elif child["type"] == "sequence": child["minOccurs"] = child["maxOccurs"] = 1 choices.append(child) - #raise ValueError("\"sequence\" in \"choice\" is not supported. Create instead a new complex type!") + # raise ValueError("\"sequence\" in \"choice\" is not supported. Create instead a new complex type!") elif child["type"] == CHOICE: choices.extend(child["choices"]) elif child["type"] == "group": @@ -1008,9 +1008,10 @@ return True return schema == reference -#------------------------------------------------------------------------------- + +# ------------------------------------------------------------------------------- # Base class for XSD schema extraction -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- class XSDClassFactory(ClassFactory): @@ -1133,15 +1134,16 @@ return GenerateParser(XSDClassFactory(minidom.parseString(xsdstring)), xsdstring) -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- # XSD schema syntax elements -#------------------------------------------------------------------------------- +# ------------------------------------------------------------------------------- + XSD_NAMESPACE = { - #------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------- # Syntax elements definition - #------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------- "all": { "struct": """ @@ -1917,9 +1919,9 @@ "reduce": GenerateFacetReducing("whiteSpace", True) }, - #------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------- # Syntax attributes definition - #------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------- "abstract": { "type": SYNTAXATTRIBUTE, @@ -2199,9 +2201,9 @@ } }, - #------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------- # Simple types definition - #------------------------------------------------------------------------------- + # ------------------------------------------------------------------------------- "string": { "type": SIMPLETYPE,