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
|
describes the XML Schema for the NeXus NXDL definitions files |
|
root element of the nxdl.xsd file |
|
xs:attribute element |
|
xs:element |
|
a named NXDL structure type (such as groupGroup) |
internal: convenience function |
|
|
standard ValueError exception handling |
|
strip the namespace prefix from |
Internal
|
common code for NXDL Rules classes below |
|
internal: avoid a known recursion of group in a group |
|
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
- 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