namespace¶
Canonical path: o6.ns.namespace
namespace
¶
Register a namespace in the global namespace table.
Called at the top of a namespace module, before the decorated classes below it, so that the declarations know which namespace they belong to:
Unlike [o6.ns.register][] this returns nothing, and when the
calling module is itself the namespace module it adopts that module rather
than creating a second one.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
shortname
|
str
|
Short name to register the namespace under, and the attribute
it becomes on |
required |
uri
|
str
|
Namespace URI published by this model. |
required |
version
|
str
|
Model version string. |
'1.0'
|
publicationDate
|
str
|
Publication date declared by the model. |
''
|
Raises:
| Type | Description |
|---|---|
ValueError
|
The shortname is already registered for a different URI, scope, or version. |