Package pyxb :: Package namespace :: Module resolution :: Class _Resolvable_mixin
[hide private]
[frames] | no frames]

Class _Resolvable_mixin

source code

object --+    
         |    
   cscRoot --+
             |
            _Resolvable_mixin
Known Subclasses:

Mix-in indicating that this object may have references to unseen named components.

This class is mixed-in to those XMLSchema components that have a reference to another component that is identified by a QName. Resolution of that component may need to be delayed if the definition of the component has not yet been read.

Instance Methods [hide private]
 
isResolved(self)
Determine whether this named component is resolved.
source code
 
_resolve(self)
Perform whatever steps are required to resolve this component.
source code
 
_queueForResolution(self, why=None, depends_on=None)
Short-hand to requeue an object if the class implements _namespaceContext().
source code

Inherited from cscRoot: __init__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  _TraceResolution = False
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

isResolved(self)

source code 

Determine whether this named component is resolved.

Override this in the child class.

_resolve(self)

source code 

Perform whatever steps are required to resolve this component.

Resolution is performed in the context of the namespace to which the component belongs. Invoking this method may fail to complete the resolution process if the component itself depends on unresolved components. The sole caller of this should be _NamespaceResolution_mixin.resolveDefinitions.

This method is permitted (nay, encouraged) to raise an exception if resolution requires interpreting a QName and the named component cannot be found.

Override this in the child class. In the prefix, if isResolved is true, return right away. If something prevents you from completing resolution, invoke self._queueForResolution() (so it is retried later) and immediately return self. Prior to leaving after successful resolution discard any cached dom node by setting self.__domNode=None.

Returns:
self, whether or not resolution succeeds.
Raises: