summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2010-02-25 16:43:35 +0000
committerjortel <devnull@localhost>2010-02-25 16:43:35 +0000
commit019ec19692d7d8717a77500bbd2e350cbc7ddb91 (patch)
treeb1d801628727f13f4b1f28f366401a18fcefcfb3
parent6c5cb9d77eabc22ad84459bfccfdf5bd5f4a3f77 (diff)
downloadsuds-019ec19692d7d8717a77500bbd2e350cbc7ddb91.tar.gz
Add base for <xs:list/> support.
-rw-r--r--suds/__init__.py4
-rw-r--r--suds/xsd/sxbase.py8
-rw-r--r--suds/xsd/sxbasic.py20
3 files changed, 28 insertions, 4 deletions
diff --git a/suds/__init__.py b/suds/__init__.py
index 2a5d4b5..3c9341b 100644
--- a/suds/__init__.py
+++ b/suds/__init__.py
@@ -26,8 +26,8 @@ import sys
# Project properties
#
-__version__ = '0.3.9'
-__build__="GA R659-20100219"
+__version__ = '0.4'
+__build__="(beta) R660-20100219"
#
# Exceptions
diff --git a/suds/xsd/sxbase.py b/suds/xsd/sxbase.py
index c03f525..9c2cb1f 100644
--- a/suds/xsd/sxbase.py
+++ b/suds/xsd/sxbase.py
@@ -225,6 +225,14 @@ class SchemaObject(object):
"""
return False
+ def xslist(self):
+ """
+ Get whether this is an <xs:list/>
+ @return: True if any, else False
+ @rtype: boolean
+ """
+ return False
+
def all(self):
"""
Get whether this is an <xs:all/>
diff --git a/suds/xsd/sxbasic.py b/suds/xsd/sxbasic.py
index 4c7e8a4..0b536d2 100644
--- a/suds/xsd/sxbasic.py
+++ b/suds/xsd/sxbasic.py
@@ -188,7 +188,7 @@ class Simple(SchemaObject):
"""
def childtags(self):
- return ('restriction', 'any',)
+ return ('restriction', 'any', 'list',)
def enum(self):
for child, ancestry in self.children():
@@ -210,6 +210,21 @@ class Simple(SchemaObject):
if c.restriction():
return True
return False
+
+
+class List(SchemaObject):
+ """
+ Represents an (xsd) schema <xs:list/> node
+ """
+
+ def childtags(self):
+ return ()
+
+ def description(self):
+ return ('name',)
+
+ def xslist(self):
+ return True
class Restriction(SchemaObject):
@@ -687,7 +702,8 @@ class Factory:
'complexType' : Complex,
'group' : Group,
'attributeGroup' : AttributeGroup,
- 'simpleType' : Simple,
+ 'simpleType' : Simple,
+ 'list' : List,
'element' : Element,
'attribute' : Attribute,
'sequence' : Sequence,