ok

Mini Shell

Direktori : /opt/imunify360/venv/lib/python3.11/site-packages/lxml/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/lxml/__pycache__/ElementInclude.cpython-311.pyc

�

=�Dgp!���dZddlmZ	ddlmZddlmZn#e$rddlmZddl	mZYnwxYwdZ
e
dzZe
dzZe
dzZ
d	ZGd
�dej��ZGd�d
e��Zdd�Zdd�Zd�Zddefd�Zddedfd�ZdS)a
Limited XInclude support for the ElementTree package.

While lxml.etree has full support for XInclude (see
`etree.ElementTree.xinclude()`), this module provides a simpler, pure
Python, ElementTree compatible implementation that supports a simple
form of custom URL resolvers.
�)�etree)�urljoin)�urlopenz!{http://www.w3.org/2001/XInclude}�include�fallback�*�c��eZdZdS)�FatalIncludeErrorN��__name__�
__module__�__qualname__���u/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib64/python3.11/site-packages/lxml/ElementInclude.pyrrK��������Drrc��eZdZdS)�LimitedRecursiveIncludeErrorNrrrrrrOrrrNc��t|d��}|dkr'tj|�����}n-|���}|sd}|�|��}|���|S)N�rb�xml�utf-8)�openr�parse�getroot�read�decode�close)�hrefr�encoding�file�datas     r�default_loaderr$`st����d���D���~�~��{�4� � �(�(�*�*����y�y�{�{���	��H��{�{�8�$�$���J�J�L�L�L��Krc�,�|dkr(tj||�����}ned|vrt|��}nt	|d��}|���}|���|sd}|�|��}|S)Nrz://rr)rrrrrrrr)r rr!�parserr#�fs      r�_lxml_default_loaderr(qs�����~�~��{�4��(�(�0�0�2�2����D�=�=���
�
�A�A��T�4� � �A��v�v�x�x��	���	�	�	��	��H��{�{�8�$�$���Krc���d�fd�	}|S)Nc����|||��S�Nr)r rr!r&�loaders    �r�loadz_wrap_et_loader.<locals>.load�s����v�d�E�8�,�,�,r�NNr)r,r-s` r�_wrap_et_loaderr/�s&���-�-�-�-�-�-��Krc�`�|�d}n|dkrtd|z���|�Xt|d��r|}|���}n|���}t|d��r|jj}n$t|d��r|���}t
||||��dS)N���rz;expected non-negative depth or None for 'max_depth', got %rr�docinfo)�
ValueError�hasattrr�getroottreer2�URL�_include)�elemr,�base_url�	max_depth�trees     rrr�s������	�	�	�Q����V�Yb�b�c�c�c����4��#�#�	&��D��<�<�>�>�D�D��#�#�%�%�D��4��#�#�	(��|�'�H��	��y�	!�	!���|�|�~�~���T�6�8�Y�/�/�/�/�/rc	�&�|�t|��}nt}|�t��}|���j}t|�t����}|D�]#}|jtk�r�t||�d����}	|�dd��}
|���}|
dkr�|	|vrtd|	z���|dkrtd|	z���||	|
|���}|�td|	�d	|
�����t|||	|d
z
|	h|z��}|jr|jpd|jz|_|�|cS|�||����|
dkr�||	|
|�d
�����}
|
�td|	�d	|
�����|���}|�|jpd|
z|_n!|�|
cS|jpd|
z|jpdz|_|�|�����td|
z���|jt*kr?|���}|�'|jtkrtd|jz�����td|jz���|S)Nr rrz recursive include of %r detectedrz5maximum xinclude depth reached when including file %s)r&zcannot load z as ���textr!)r!z)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r)z0Invalid element found in XInclude namespace (%r))r/r(�setr5r&�list�iter�XINCLUDE_ITER_TAG�tag�XINCLUDE_INCLUDEr�get�	getparentrrr7�tail�replace�getpreviousr?�remove�XINCLUDE_FALLBACK)r8r,r9r:�
_parent_hrefs�load_includer&�include_elements�er r�parent�noder?�predecessors               rr7r7�s���
��&�v�.�.���+�������
�
�
�
�
�
�
&�F���	�	�#�$�$�&�&���4�4���5�$�$�$��8�Q�U�U�6�]�]�3�3�D��E�E�'�5�)�)�E��[�[�]�]�F���~�~��=�(�(�+�:�T�A������>�>�6�O�RV�V�X�X�X�#�|�D�%��?�?�?���<�+�+�26�$�$���>���� ��f�d�I��M�D�6�M�CY�Z�Z���6�;�!%���b�A�F� :�D�I��>��K�K�K����q�$�'�'�'�'��&���#�|�D�%�!�%�%�
�:K�:K�L�L�L���<�+�+�26�$�$���>���� �m�m�o�o���*�(3�(8�(>�B�$�'F�K�$�$��^��K�K�K�#)�;�#4�"��"<����"�"M�F�K��
�
�a� � � � �'�?�%�G�����U�'�
'�
'��[�[�]�]�F��!�f�j�4D�&D�&D�'�F���N�����$�B�Q�U�J���
��Krr+r.)�__doc__�lxmlr�urlparser�urllib2r�ImportError�urllib.parse�urllib.request�XINCLUDErErLrC�DEFAULT_MAX_INCLUSION_DEPTH�LxmlSyntaxErrorrrr$r(r/rr7rrr�<module>r^s���X��������'� � � � � � ����������'�'�'�$�$�$�$�$�$�&�&�&�&�&�&�&�&�'����
/���i�'���z�)���s�N�� ��	�	�	�	�	��-�	�	�	�	�	�	�	�	�#4�	�	�	�"
�
�
�
�"
�
�
�
�&���0��1�0�0�0�0�(��2�$�D�D�D�D�D�Ds��+�+

Zerion Mini Shell 1.0