AlkantarClanX12

Your IP : 18.119.113.79


Current Path : /opt/alt/python311/lib64/python3.11/xml/dom/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/xml/dom/__pycache__/domreg.cpython-311.pyc

�

c��f{
��:�dZddlZddd�ZiZd�Zd�Zdd	�Zd
�ZdS)z�Registration 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)�minidom�4DOMc��|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)�name�factorys  �5/opt/alt/python311/lib64/python3.11/xml/dom/domreg.py�registerDOMImplementationr
s���J�t����c�H�|D]\}}|�||��sdS�dS)zF_good_enough(dom, features) -> Return 1 if the dom offers the featuresr�)�
hasFeature)�dom�features�f�vs    r	�_good_enoughr s<�������!��~�~�a��"�"�	��1�1�	��1r�c��ddl}d}t�|��}|r't|iidg��}|���S|rt|��Stjjs$d|j	vrt	|j	d���St|t��rt|��}t
�
��D] }|��}t||��r|cS�!t���D]8}	t	|���}n#t $rY� wxYwt||��r|cS�9t#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.rN�getDOMImplementation�
PYTHON_DOM)rz$no suitable DOM implementation found)�os�well_known_implementations�get�
__import__rr�sys�flags�ignore_environment�environ�
isinstance�str�_parse_feature_string�valuesr�keys�	Exception�ImportError)rrr�creator�modrs      r	rr's����I�I�I��G�
$�
(�
(��
.�
.�C�
�E���b�"�'=�&>�?�?���'�'�)�)�)�	
�E��$��!�!�!�
�Y�
)�E�l�b�j�.H�.H�#�2�:�l�+C�D�D�D�D��(�C� � �3�(��2�2���$�$�&�&�����g�i�i����X�&�&�	��J�J�J�	�.�2�2�4�4����	�&�g�6�6�6�C�C���	�	�	��H�	������X�&�&�	��J�J�J�	��<�
=�
=�=s�D � 
D-�,D-c�H�g}|���}d}t|��}||krg||}|ddvrtd|�����|dz}d}||kr||}|ddvr|dz}|}|�||f��||k�gt	|��S)Nr�
0123456789zbad feature name: r
)�split�len�
ValueError�append�tuple)�sr�parts�i�length�feature�versionrs        r	r"r"Rs����H�
�G�G�I�I�E�	�A�
��Z�Z�F�
�f�*�*���(���1�:��%�%��*�w�w�@�A�A�A�
��E�����v�:�:��a��A���t�|�#�#���E��������'�*�+�+�+��f�*�*���?�?�r)Nr)�__doc__rrrr
rrr"rrr	�<module>r7s���>�>��
�
�
� �'�����
�	�	�	�
�
�
�)>�)>�)>�)>�V����r