ACC SHELL
Ńň
tÄMc @ sX d Z d d k Th d d 6d d 6Z h Z d Z d Z d d d Z d
Z d 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 *s xml.dom.minidomt minidoms xml.dom.DOMImplementationt 4DOMc C s | t | <d S( sI registerDOMImplementation(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( t
registered( t namet factory( ( s$ /usr/lib/python2.6/xml/dom/domreg.pyt registerDOMImplementation s c C s3 x, | D]$ \ } } | i | | p d Sq Wd S( sF _good_enough(dom, features) -> Return 1 if the dom offers the featuresi i ( t
hasFeature( t domt featurest ft v( ( s$ /usr/lib/python2.6/xml/dom/domreg.pyt _good_enough s
c
C s@ d d k } d } t i | } | o# t | h h d g } | i S| o t | S| i i d o t d | i d St | t
o t | } n x2 t i D]$ } | } t
| | o | Sqł WxU t i D]G } y t d | } Wn t j
o
qč n Xt
| | o | Sqč Wt d d S( sS getDOMImplementation(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˙˙˙˙Nt getDOMImplementationt
PYTHON_DOMR s$ no suitable DOM implementation found( t ost Nonet well_known_implementationst gett
__import__R
R t environt has_keyt
isinstancet StringTypest _parse_feature_stringt valuesR t keyst
StandardErrort ImportError( R R R t creatort modR ( ( s$ /usr/lib/python2.6/xml/dom/domreg.pyR
' s4
c C sŐ g } | i } d } t | } x¤ | | j o | | } | d d j o t d | f n | d } d } | | j o3 | | } | d d j o | d } | } qł n | i | | f q' Wt | S( Ni t
0123456789s bad feature name: %ri ( t splitt lent
ValueErrorR t appendt tuple( t sR t partst it lengtht featuret versionR ( ( s$ /usr/lib/python2.6/xml/dom/domreg.pyR R s$
N( ( t __doc__t xml.dom.minicompatR R R R R R
R ( ( ( s$ /usr/lib/python2.6/xml/dom/domreg.pyt <module> s
+
ACC SHELL 2018