ž ryMaJ c@sZdZidd6dd6ZiZdd„Zdd„Zd fd d „Zd d „Zd S(u´Registration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.uxml.dom.minidomuminidomuxml.dom.DOMImplementationu4DOMcCs|t| Return 1 if the dom offers the featuresii(u hasFeature(udomufeaturesufuv((u3/opt/alt/python33/lib64/python3.3/xml/dom/domreg.pyu _good_enoughsu _good_enoughc Cs3ddl}d}tj|ƒ}|rIt|iidgƒ}|jƒS|rZt|ƒSd|jkr}td|jdƒSt|t ƒr›t |ƒ}nx0tj ƒD]"}|ƒ}t ||ƒr¨|Sq¨WxRtj ƒD]D}ytd|ƒ}Wntk r wÛYnXt ||ƒrÛ|SqÛWtdƒ‚dS(uSgetDOMImplementation(name = None, features = ()) -> DOM implementation. Return a suitable DOM implementation. The name is either well-known, the module name of a DOM implementation, or None. If it is not None, imports the corresponding module and returns DOMImplementation object if the import succeeds. If name is not given, consider the available implementations to find one with the required feature set. If no implementation can be found, raise an ImportError. The features list must be a sequence of (feature, version) pairs which are passed to hasFeature.iNugetDOMImplementationu PYTHON_DOMunameu$no suitable DOM implementation found(uosuNoneuwell_known_implementationsugetu __import__ugetDOMImplementationu registereduenvironu isinstanceustru_parse_feature_stringuvaluesu _good_enoughukeysu Exceptionu ImportError(unameufeaturesuosucreatorumodudom((u3/opt/alt/python33/lib64/python3.3/xml/dom/domreg.pyugetDOMImplementation%s0     ugetDOMImplementationcCsÐg}|jƒ}d}t|ƒ}xŸ||krÅ||}|ddkrctd|fƒ‚n|d}d}||kr¯||}|ddkr¯|d}|}q¯n|j||fƒq'Wt|ƒS(Niu 0123456789ubad feature name: %ri(usplitulenu ValueErroruNoneuappendutuple(usufeaturesupartsuiulengthufeatureuversionuv((u3/opt/alt/python33/lib64/python3.3/xml/dom/domreg.pyu_parse_feature_stringPs"        u_parse_feature_stringN(u__doc__uwell_known_implementationsu registereduregisterDOMImplementationu _good_enoughuNoneugetDOMImplementationu_parse_feature_string(((u3/opt/alt/python33/lib64/python3.3/xml/dom/domreg.pyus  +