Package suds :: Module resolver :: Class NodeResolver
[hide private]
[frames] | no frames]

Class NodeResolver

source code

Resolver --+    
           |    
TreeResolver --+
               |
              NodeResolver

The node resolver is a stateful XML document resolver used to resolve each node in a tree. As such, it mirrors the tree structure to ensure that nodes are resolved in context.

Instance Methods [hide private]
 
__init__(self, schema) source code
xsd.sxbase.SchemaObject
find(self, node, resolved=False, push=True)
Returns: The found schema type
source code
xsd.sxbase.SchemaObject
findattr(self, name, resolved=True)
Find an attribute type definition.
source code
 
query(self, name, node)
blindly query the schema by name
source code
 
known(self, node)
resolve type referenced by @xsi:type
source code

Inherited from TreeResolver: depth, getchild, pop, push, reset, top

Instance Variables [hide private]

Inherited from TreeResolver: stack

Inherited from Resolver: schema

Method Details [hide private]

__init__(self, schema)
(Constructor)

source code 
Parameters:
Overrides: Resolver.__init__

find(self, node, resolved=False, push=True)

source code 

Get the definition object for the schema object by name.

Parameters:
  • node (sax.element.Element) - An xml node to be resolved.
  • resolved (boolean) - A flag indicating that the fully resolved type should be returned.
  • push (boolean) - Indicates that the resolved type should be pushed onto the stack.
Returns: xsd.sxbase.SchemaObject
The found schema type
Overrides: Resolver.find

findattr(self, name, resolved=True)

source code 

Find an attribute type definition.

Parameters:
  • name (basestring) - An attribute name.
  • resolved (boolean) - A flag indicating that the fully resolved type should be returned.
Returns: xsd.sxbase.SchemaObject
The found schema type