Table of Contents

Class: XMLKey ./src/peak/config/config_components.py
XMLKey(kind,xmlns,name)
key to look up XML elements and attributes

Usage:

        # Get a key for the 'foo' element in XML namespace 'http://something'
        key = config.XMLKey('element','http://something','foo')

kind must be a string equal to "element" or "attribute". xmlns should be an XML namespace URI, or an asterisk ("*"). name should be an unqualified XML element or attribute name, or an asterisk. Asterisks indicate wildcards, similar to the way wildcards work in PropertyName objects. When an XMLKey is used as a configuration key, it searches first for an exact match, then a wildcard name match with the same XML namespace, then a wildcard XML namespace match with the same element or attribute name, and finally it looks for a wildcard in both positions. (Note, however, that the element and attribute configuration namespaces are entirely disjoint, and do not overlap in any way; an XML element lookup will never return an XML attribute or vice versa.)

kind, xmlns, and name are all accessible as attributes of an XMLKey, so you can use them in wildcard rules, e.g.:

        [XML Attributes for http://something]
        * = some_module.someFunc(configKey.name)

Methods   
__cmp__
__hash__
__init__
__repr__
lookupKeys
parentKeys
registrationKeys
  __cmp__ 
__cmp__ ( self,  other )

  __hash__ 
__hash__ ( self )

  __init__ 
__init__ (
        self,
        kind,
        xmlns,
        name,
        )

  __repr__ 
__repr__ ( self )

  lookupKeys 
lookupKeys ( self )

  parentKeys 
parentKeys ( self )

  registrationKeys 
registrationKeys ( self,  depth=0 )


Table of Contents

This document was automatically generated on Mon Apr 29 01:11:05 2024 by HappyDoc version 2.1