Home | Trees | Indices | Help |
|
---|
|
object --+ | cscRoot --+ | _NamespaceCategory_mixin --+ | object --+ | | | cscRoot --+ | | | resolution._NamespaceResolution_mixin --+ | object --+ | | | cscRoot --+ | | | _NamespaceComponentAssociation_mixin --+ | object --+ | | | cscRoot --+ | | | archive._NamespaceArchivable_mixin --+ | Namespace
Represents an XML namespace (a URI).
There is at most one Namespace class instance per namespace (URI). The instance also supports associating arbitrary maps from names to objects, in separate categories. The default categories are configured externally; for example, the Schema component defines a category for each named component in XMLSchema, and the customizing subclass for WSDL definitions adds categories for the service bindings, messages, etc.
Namespaces can be written to and loaded from pickled files. See NamespaceArchive for information.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
|
|||
|
|||
|
|
|||
a new object with type S, a subtype of T |
|
|
|||
__AbsentNamespaces =
|
|||
__Registry =
|
|||
__absentNamespaceID = 0
|
|||
__bindingConfiguration = None hash(x) |
|||
__boundPrefix = None hash(x) |
|||
__builtinModulePath = None hash(x) |
|||
__contextDefaultNamespace = None hash(x) |
|||
__contextInScopeNamespaces = None hash(x) |
|||
__definedBuiltins = False
|
|||
__description = None hash(x) |
|||
__didValidation = False
|
|||
__hasBeenArchived = False
|
|||
__inValidation = False
|
|||
__initialNamespaceContext = None hash(x) |
|||
__isBuiltinNamespace = False
|
|||
__isLoadedNamespace = False
|
|||
__isUndeclaredNamespace = False
|
|||
__namespaceArchive = None hash(x) |
|||
__prefix = None hash(x) |
|||
__uri = None hash(x) |
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Create an absent namespace. Use this instead of the standard constructor, in case we need to augment it with a uuid or the like. |
If a Namespace instance for the given URI exists, return it; otherwise return None. Note; Absent namespaces are not stored in the registry. If you use one (e.g., for a schema with no target namespace), don't lose hold of it. |
Pickling support. To ensure that unpickled Namespace instances are unique per URI, we ensure that the routine that creates unpickled instances knows what it's supposed to return. |
Support pickling. Well, no, not really. Because namespace instances must be unique, we represent them as their URI, and that's done by __getnewargs__ above. All the interesting information is in the ModuleRecords. |
Identify the specified namespace, which should be a built-in. Normally we can just use a reference to the Namespace module instance, but when creating those instances we sometimes need to refer to ones for which the instance has not yet been created. In that case, we use the name of the instance, and resolve the namespace when we need to create the initial context. |
Create a new Namespace. The URI must be non-None, and must not already be assigned to a Namespace instance. See NamespaceForURI(). User-created Namespace instances may also provide a description. Users should never provide a builtin_namespace parameter.
|
Pickling and singleton support. This ensures that no more than one Namespace instance exists for any given URI. We could do this up in __init__, but that doesn't normally get called when unpickling instances; this does. See also __getnewargs__().
|
str(x)
|
Attempts to load the named objects held in this namespace. The base class implementation looks at the set of available archived namespaces, and if one contains this namespace unserializes its named object maps. Sub-classes may choose to look elsewhere, if this version fails or before attempting it. There is no guarantee that any particular category of named object has been located when this returns. Caller must check. |
Replace the existing definition with another. This is used in a situation where building the component model resulted in a new component instance being created and registered, but for which an existing component is to be preferred. An example is when parsing the schema for XMLSchema itself: the built-in datatype components should be retained instead of the simple type definition components dynamically created from the schema. By providing the value
Note: Invoking this requires scans of every item in every category map in the namespace. |
CSC extension to reset fields of a Namespace. This one handles category-related data.
|
Return the standard prefix to be used for this namespace. Only a few namespace prefixes are bound to namespaces: xml and xmlns are two. In all other cases, this method should return None. The infrastructure attempts to prevent user creation of Namespace instances that have bound prefixes. |
Return |
Obtain the namespace context to be used when creating components in this namespace. Usually applies only to built-in namespaces, but is also used in the autotests when creating a namespace without a xs:schema element. . Note that we must create the instance dynamically, since the information that goes into it has cross-dependencies that can't be resolved until this module has been completely loaded. |
Return True iff this namespace is an absent namespace. Absent namespaces have no namespace URI; they exist only to hold components created from schemas with no target namespace. |
Return True iff this namespace was defined by the infrastructure. That is the case for all namespaces in the Namespace module. |
Return True iff this namespace is always available regardless of whether there is a declaration for it. This is the case only for the xml(http://www.w3.org/XML/1998/namespace) and xmlns(http://www.w3.org/2000/xmlns/) namespaces. |
Return the URI for the namespace represented by this instance. If the URI is None, this is an absent namespace, used to hold declarations not associated with a namespace (e.g., from schema with no target namespace). |
Ensure this namespace is ready for use. If the namespace does not have a map of named objects, the system will attempt to load one. |
|
__Registry
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Sep 9 14:08:51 2011 | http://epydoc.sourceforge.net |