ó JÑÕfc@sXdZddlTidd6dd6ZiZd„Zd„Zd d d „Zd „Zd S( s´Registration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.iÿÿÿÿ(t*sxml.dom.minidomtminidomsxml.dom.DOMImplementationt4DOMcCs|t| Return 1 if the dom offers the featuresii(t hasFeature(tdomtfeaturestftv((s&/usr/lib64/python2.7/xml/dom/domreg.pyt _good_enough scCs/ddl}d}tj|ƒ}|rIt|iidgƒ}|jƒS|rZt|ƒSd|jkr}td|jdƒSt|t ƒr›t |ƒ}nx0tj ƒD]"}|ƒ}t ||ƒr¨|Sq¨WxQtj ƒD]C}ytd|ƒ}Wntk r qÛnXt ||ƒrÛ|SqÛWtd‚dS(sSgetDOMImplementation(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.iÿÿÿÿNtgetDOMImplementationt PYTHON_DOMRs$no suitable DOM implementation found(tostNonetwell_known_implementationstgett __import__R Rtenviront isinstancet StringTypest_parse_feature_stringtvaluesR tkeyst StandardErrort ImportError(RR RtcreatortmodR((s&/usr/lib64/python2.7/xml/dom/domreg.pyR 's0     cCsÍg}|jƒ}d}t|ƒ}xœ||krÂ||}|ddkr`td|f‚n|d}d}||kr¬||}|ddkr¬|d}|}q¬n|j||fƒq'Wt|ƒS(Nit 0123456789sbad feature name: %ri(tsplittlent ValueErrorRtappendttuple(tsR tpartstitlengthtfeaturetversionR ((s&/usr/lib64/python2.7/xml/dom/domreg.pyRRs"        N(( t__doc__txml.dom.minicompatRRRR RR R(((s&/usr/lib64/python2.7/xml/dom/domreg.pyts   +