Manage the XML Schema files : schema_manager
¶
-tba-
source code documentation¶
manages the XML Schema of this project
The schema_manager calls the cache_manager and is called by nxdl_manager.
Public
SchemaManager ([path]) |
describes the XML Schema for the NeXus NXDL definitions files |
Schema_Root (element_node[, obj_name, …]) |
root element of the nxdl.xsd file |
Schema_Attribute (xml_obj[, obj_name, …]) |
xs:attribute element |
Schema_Element (xml_obj[, obj_name, ns_dict, …]) |
xs:element |
Schema_Type (ref[, tag, schema_root]) |
a named NXDL structure type (such as groupGroup) |
get_default_schema_manager () |
internal: convenience function |
raise_error (node, text, obj) |
standard ValueError exception handling |
strip_ns (ref) |
strip the namespace prefix from ref |
Internal
_Mixin (xml_obj[, obj_name, ns_dict, schema_root]) |
common code for NXDL Rules classes below |
_GroupParsing |
internal: avoid a known recursion of group in a group |
_Recursion (obj_name) |
internal: an element used in recursion, such as child group of group |
-
class
punx.schema_manager.
SchemaManager
(path=None)[source]¶ describes the XML Schema for the NeXus NXDL definitions files
-
class
punx.schema_manager.
Schema_Attribute
(xml_obj, obj_name=None, ns_dict=None, schema_root=None)[source]¶ xs:attribute element
Parameters: - xml_obj (lxml.etree.Element) – XML element
- obj_name (str) – optional, default taken from
xml_obj
- ns_dict (dict) – optional, default taken from
NAMESPACE_DICT
- schema_root (obj) – optional, instance of lxml.etree._Element
-
class
punx.schema_manager.
Schema_Element
(xml_obj, obj_name=None, ns_dict=None, schema_root=None)[source]¶ xs:element
Parameters: - xml_obj (lxml.etree.Element) – XML element
- obj_name (str) – optional, default taken from
xml_obj
- ns_dict (dict) – optional, default taken from
NAMESPACE_DICT
- schema_root (obj) – optional, instance of lxml.etree._Element
See: See: http://download.nexusformat.org/doc/html/nxdl_desc.html#nxdl-elements
-
class
punx.schema_manager.
Schema_Root
(element_node, obj_name=None, ns_dict=None, schema_root=None, schema_manager=None)[source]¶ root element of the nxdl.xsd file
Parameters: - xml_obj (lxml.etree.Element) – XML element
- obj_name (str) – optional, default taken from
xml_obj
- ns_dict (dict) – optional, default taken from
NAMESPACE_DICT
- schema_root (obj) – optional, instance of lxml.etree._Element
-
class
punx.schema_manager.
Schema_Type
(ref, tag='*', schema_root=None)[source]¶ a named NXDL structure type (such as groupGroup)
Parameters: - ref (str) – name of NXDL structure type (such as
groupGroup
) - tag (str) – XML Schema element tag, such as complexType (default=``*``)
- schema_root (obj) – optional, instance of lxml.etree._Element
See: See: http://download.nexusformat.org/doc/html/nxdl_desc.html#nxdl-data-types-internal
- ref (str) – name of NXDL structure type (such as
-
class
punx.schema_manager.
Schema_nxdlType
(xml_obj, ns_dict=None, schema_root=None)[source]¶ one of the types defined in the file nxdlTypes.xsd
-
class
punx.schema_manager.
Schema_pattern
[source]¶ describe the regular expression patterns ofr names of NeXus things