Vc{ :dZddlZdddZiZdZdZd d Zd ZdS) zRegistration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.Nzxml.dom.minidomzxml.dom.DOMImplementation)minidom4DOMc|t|<dS)aIregisterDOMImplementation(name, factory) Register the factory function with the name. The factory function should return an object which implements the DOMImplementation interface. The factory function can either return the same object, or a new one (e.g. if that implementation supports some customization).N) registered)namefactorys '/usr/lib64/python3.11/xml/dom/domreg.pyregisterDOMImplementationr sJtcH|D]\}}|||sdSdS)zF_good_enough(dom, features) -> Return 1 if the dom offers the featuresr) hasFeature)domfeaturesfvs r _good_enoughr s<!~~a"" 11  1r cddl}d}t|}|r't|iidg}|S|rt |St jjs$d|j vrt |j dSt|trt|}t D] }|}t||r|cS!tD]8} t |}n#t $rY wxYwt||r|cS9t#d)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.rNgetDOMImplementation PYTHON_DOM)rz$no suitable DOM implementation found)oswell_known_implementationsget __import__rrsysflagsignore_environmentenviron isinstancestr_parse_feature_stringvaluesrkeys Exception ImportError)rrrcreatormodrs r rr'sIIIG $ ( ( . .C Eb"'=&>??''))) E$!!! Y )Elbj.HE#2:l+CDDDD(C  3(22$$&&gii X & & JJJ .2244 &g666CC    H  X & & JJJ  < = ==sD  D-,D-cHg}|}d}t|}||krg||}|ddvrtd||dz}d}||kr||}|ddvr|dz}|}|||f||kgt |S)Nr 0123456789zbad feature name: r )splitlen ValueErrorappendtuple)srpartsilengthfeatureversionrs r r"r"RsH GGIIE A ZZF f* ,( 1: % B*ww@AA A E v: aAt|# E'*+++ f* , ??r )Nr)__doc__rrrr rrr"rr r r7s>>  '       )>)>)>)>Vr