Home | Trees | Indices | Help |
|
---|
|
A stan-like model for building namespaced XML trees.
The main reason for this module is that much of the VO's XML mess is based on XML schema and thus has namespaced attributes. This single design decision ruins the entire XML design. To retain some rests of sanity, I treat the prefixes themselves as namespaces and maintain a single central registry from prefixes to namespaces in this module.
Then, the elements only use these prefixes, and this module makes sure that during serialization the instance document's root element contains the namespace mapping (and the schema locations) required.
Classes | |
Error | |
ChildNotAllowed | |
Stub A sentinel class for embedding objects not yet existing into stanxml trees. |
|
Element An element for serialization into XML. |
|
NSRegistry A container for a registry of namespace prefixes to namespaces. |
|
DOMMorpher An object encapsulating the process of turning a stanxml.Element tree into an ElementTree. |
|
NillableMixin An Element mixin making the element XSD nillable. |
Functions | |||
|
|||
|
|||
|
|||
|
|||
|
Variables | |
encoding =
|
|
XML_HEADER =
|
|
xsiPrefix =
|
|
__package__ =
|
Function Details |
returns the URL to the local mirror of the schema xsdName. This is used by the various xmlstan clients to make schemaLocations. |
writes an xmlstan tree starting at root to destFile. prefixForEmpty is a namespace URI that should have no prefix at all. |
returns a unicode object containing tree in serialized forms. tree can be any object with a render method or some sort of string. If it's a byte string, it must not contain any non-ASCII. If prolog is given, it must be a string that will be prepended to the serialization of tree. The way ElementTree currently is implemented, you can use this for xml declarations or stylesheet processing instructions. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu May 2 07:29:09 2019 | http://epydoc.sourceforge.net |