JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr Yf{ @sddZddlZddddiZiZddZd d Zdfd d Zd dZdS)zRegistration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.NZminidomzxml.dom.minidomZ4DOMzxml.dom.DOMImplementationcCs|t| Return 1 if the dom offers the featuresr)Z hasFeature)domfeaturesfvrrr _good_enough sr c Cs=ddl}d}tj|}|rIt|iidg}|jS|rZt|Stjj rd|j krtd|j dSt |t rt |}x0tj D]"}|}t||r|SqWxRtjD]D}ytd|}Wntk rwYnXt||r|SqWtddS)aSgetDOMImplementation(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.rNgetDOMImplementationZ PYTHON_DOMrz$no suitable DOM implementation found)oswell_known_implementationsget __import__rrsysflagsignore_environmentenviron isinstancestr_parse_feature_stringvaluesr keys Exception ImportError)rr rZcreatormodr rrrr's0      rcCsg}|j}d}t|}x||kr||}|ddkr`td|f|d}d}||kr||}|ddkr|d}|}|j||fq'Wt|S)Nr 0123456789zbad feature name: %rr)splitlen ValueErrorappendtuple)sr partsiZlengthZfeatureversionr rrrrRs"       r)__doc__rrrrr rrrrrrs   +