diff options
author | jortel <devnull@localhost> | 2009-01-16 20:23:56 +0000 |
---|---|---|
committer | jortel <devnull@localhost> | 2009-01-16 20:23:56 +0000 |
commit | cf7a832de9a6ab3cbc302d025af432e906476d52 (patch) | |
tree | 078b3ab38c8d6d0689f088d15c1d99a8bfa1f160 /suds/xsd/__init__.py | |
parent | 9bfd3bd2308962c73a1280be14aded40845ba40c (diff) | |
download | suds-cf7a832de9a6ab3cbc302d025af432e906476d52.tar.gz |
Refactored xsd package: The schema object simplified to hold all children in (rawchildren); removed all flattening, since the tree is no longer re-arraned, all node copying has been removed :-). this will greatly improve performance in schemas with lots of references. flattening replaced by on-demaind approach using an iterator to provide a flattened view; redesigned dereferencing of @ref/@base using dependency sorted list. This ensures that all elements in the schema are dereferenced and in the correct order.
Diffstat (limited to 'suds/xsd/__init__.py')
-rw-r--r-- | suds/xsd/__init__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/suds/xsd/__init__.py b/suds/xsd/__init__.py index 0e55563..0917f3f 100644 --- a/suds/xsd/__init__.py +++ b/suds/xsd/__init__.py @@ -71,3 +71,16 @@ def isqref(object): len(object) == 2 and \ isinstance(object[0], basestring) and \ isinstance(object[1], basestring)) + + +class Filter: + def __init__(self, inclusive=False, *items): + self.inclusive = inclusive + self.items = items + def __contains__(self, x): + if self.inclusive: + result = ( x in self.items ) + else: + result = ( x not in self.items ) + return result + |