mς &U²Ic@sYdZdkThdd<dd Return 1 if the dom offers the featuresiiN(tfeaturestftvtdomt hasFeature(R RR R ((Rt _good_enough s   cCsLdk}d}ti|ƒ}|o&t|hhdgƒ}|iƒSnB|ot |ƒSn,|i i dƒotd|i dƒSnt |tƒot|ƒ}nx5t iƒD]'}|ƒ}t||ƒo|SqΉqΉWxXtiƒD]J}ytd|ƒ}Wntj o qρnXt||ƒo|Sqρqρ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.NtgetDOMImplementationt PYTHON_DOMRs$no suitable DOM implementation found(tostNonetcreatortwell_known_implementationstgetRtmodt __import__RRtenvironthas_keyt isinstanceRt StringTypest_parse_feature_stringtvaluesR R tkeyst StandardErrort ImportError(RRRR RR((RR's6       cCsΥg}|iƒ}d}t|ƒ}x€||jo–||}|ddjotd|f‚n|d}d}||jo3||}|ddjo|d}|}q³n|i ||fƒq'Wt |ƒS(Nit 0123456789sbad feature name: %ri(Rtstsplittpartstitlentlengthtfeaturet ValueErrorRtversionR tappendttuple(R!RR$R'R&R#R)R ((RRRs$        N( t__doc__txml.dom.minicompatRRRR RRR(RR RRRR((Rt?s +