type _ScopedDeclaration_mixin
source code
object --+
|
cscRoot --+
|
_ScopedDeclaration_mixin
- Known Subclasses:
-
Mix-in class for named components that have a scope.
Scope is important when doing cross-namespace inheritance, e.g.
extending or restricting a complex type definition that is from a
different namespace. In this case, we will need to retain a reference to
the external component when the schema is serialized.
This is done in the pickling process by including the scope when
pickling a component as a reference. The scope is the SCOPE_global if
global; otherwise, it is a tuple containing the external namespace URI
and the NCName of the complex type definition in that namespace. We
assume that the complex type definition has global scope; otherwise, it
should not have been possible to extend or restrict it. (Should this be
untrue, there are comments in the code about a possible solution.)
|
SCOPE_global = ' global '
|
|
XSCOPE_indeterminate = ' indeterminate '
|
|
__baseDeclaration = None
|
|
_ScopedDeclaration_mixin__baseDeclaration = None
|
Return True if this scope currently assigned to this instance is
compatible with the given scope.
If either scope is indeterminate, presume they will ultimately be
compatible. Scopes that are equal are compatible, as is a local scope if
this already has a global scope.
|
The scope for the declaration.
Valid values are SCOPE_global, or a complex type definition. A value
of None means a non-global declaration that is not owned by a complex
type definition. These can only appear in attribute group definitions or
model group definitions.
To Do:
For declarations in named model groups (viz., local elements that
aren't references), the scope needs to be set by the owning complex
type.
|