Commits

Sergey A. Bozhenkov  committed 1147c3c

Change wsdl_url for XMLSchemaParser to have default None value, so that it can be used without wsdl. This also fixes the tests.

  • Participants
  • Parent commits 8cf1255

Comments (0)

Files changed (1)

File osa/xmlschema.py

     """
         Parser to get types from an XML Schema.
     """
-    def __init__(self, root, wsdl_url):
+    def __init__(self, root, wsdl_url=None):
         """
             Initialize parser.
 
 
             Parameters
             ----------
-            wsdl_url : xml schema, i.e. <schema ...> ... </schema>
+            root : xml schema, i.e. <schema ...> ... </schema>
                 The schema to parse
+            wsdl_url : string
+                Url the wsdl comes from, can be used to expand schema
+                references.
         """
-	self.wsdl_url = wsdl_url
+        if wsdl_url is None:
+            wsdl_url = ""
+        self.wsdl_url = wsdl_url
         #check we have a schema
         if root.tag != "{%s}schema" %xmlnamespace.NS_XSD:
             raise ValueError("Supplied root node '%s'"\