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

# type _Resolvable_mixin

source code

    object --+
             |
       cscRoot --+
                 |
                _Resolvable_mixin

Known Subclasses:
  - xmlschema.structures.AttributeDeclaration
  - , xmlschema.structures.AttributeGroupDefinition
  - , xmlschema.structures.AttributeUse
  - , xmlschema.structures.ComplexTypeDefinition
  - , xmlschema.structures.ElementDeclaration
  - , xmlschema.structures.IdentityConstraintDefinition
  - , xmlschema.structures.Particle
  - , xmlschema.structures.SimpleTypeDefinition

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__`

Class Variables | [hide private]
| _TraceResolution = `False`

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: `pyxb.SchemaValidationError` - if resolution requlres a reference to an unknown component