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

# type _NamespaceResolution_mixin

source code

    object --+
             |
       cscRoot --+
                 |
                _NamespaceResolution_mixin

Known Subclasses:
  - Namespace

Mix-in that aggregates those aspects of XMLNamespaces relevant to resolving component references.

Instance Methods | [hide private]
_reset(self) CSC extension to reset fields of a Namespace. | source code
_getState_csc(self, kw) | source code
_setState_csc(self, kw) | source code
importNamespace(self, namespace) | source code
_referenceNamespace(self, namespace) | source code
importedNamespaces(self) Return the set of namespaces which some schema imported while processing with this namespace as target. | source code
_transferReferencedNamespaces(self, module_record) | source code
referencedNamespaces(self) Return the set of namespaces which appear in namespace declarations of schema with this namespace as target. | source code
queueForResolution(self, resolvable, depends_on=None) Invoked to note that a component may have references that will need to be resolved. | source code
needsResolution(self) Return `True` iff this namespace has not been resolved. | source code
_replaceComponent_csc(self, existing_def, replacement_def) Replace a component definition if present in the list of unresolved components. | source code
resolveDefinitions(self, allow_unresolved=False) Loop until all references within the associated resolvable objects have been resolved. | source code
_unresolvedComponents(self) Returns a reference to the list of unresolved components. | source code
_unresolvedDependents(self) Returns a map from unresolved components to sets of components that must be resolved first. | source code
Inherited from `cscRoot`: `__init__`

Class Variables | [hide private]
| __importedNamespaces = `None`
| __referencedNamespaces = `None`
| __unresolvedComponents = `None`
| __unresolvedDependents = `None`
| _NamespaceResolution_mixin__importedNamespaces = `None`
| _NamespaceResolution_mixin__referencedNamespaces = `None`
| _NamespaceResolution_mixin__unresolvedComponents = `None`
| _NamespaceResolution_mixin__unresolvedDependents = `None`

Method Details | [hide private]

### _reset(self) | source code
CSC extension to reset fields of a Namespace. This one handles component-resolution--related data.

### queueForResolution(self, resolvable, depends_on=None) | source code
Invoked to note that a component may have references that will need to be resolved. Newly created named components are often unresolved, as are components which, in the course of resolution, are found to depend on another unresolved component. Parameters: `resolvable` - An instance of _Resolvable_mixin that is later to be resolved. `depends_on` - `None`, or an instance of _Resolvable_mixin which `resolvable` requires to be resolved in order to resolve itself. Returns: `resolvable`

### resolveDefinitions(self, allow_unresolved=False) | source code
Loop until all references within the associated resolvable objects have been resolved. This method iterates through all components on the unresolved list, invoking the _resolve method of each. If the component could not be resolved in this pass, it iis placed back on the list for the next iteration. If an iteration completes without resolving any of the unresolved components, a pyxb.NotInNamespaceError exception is raised. Note: Do not invoke this until all top-level definitions for the namespace have been provided. The resolution routines are entitled to raise a validation exception if a reference to an unrecognized component is encountered.