Your IP : 3.15.237.229


Current Path : /opt/alt/python310/lib64/python3.10/xml/etree/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/xml/etree/__pycache__/ElementInclude.cpython-310.opt-2.pyc

o

6��f��@s~ddlZddlmZddlmZdZedZedZdZGd	d
�d
e	�Z
Gdd�de
�Zdd
d�Zddefdd�Z
dd�ZdS)�N�)�ElementTree)�urljoinz!{http://www.w3.org/2001/XInclude}�includeZfallback�c@�eZdZdS)�FatalIncludeErrorN��__name__�
__module__�__qualname__�r
r
�?/opt/alt/python310/lib64/python3.10/xml/etree/ElementInclude.pyrC�rc@r)�LimitedRecursiveIncludeErrorNr	r
r
r
rrGrrcCs�|dkr#t|d��}t�|���}Wd�|S1swY|S|s'd}t|d|d��
}|��}Wd�|S1s>wY|S)N�xml�rbzUTF-8�r)�encoding)�openr�parse�getroot�read)�hrefrr�file�datar
r
r�default_loaderWs
���

��rcCsV|durd}n
|dkrtd|��t|d�r|��}|dur t}t||||t��dS)N���rz;expected non-negative depth or None for 'max_depth', got %rr)�
ValueError�hasattrrr�_include�set)�elem�loader�base_url�	max_depthr
r
rrts
cCs�d}|t|�kr�||}|jtkr�|�d�}|rt||�}|�dd�}|dkrv||vr1td|��|dkr;td|��|�|�|||�}	|	durQtd||f��t�|	�}	t	|	|||d|�|�
|�|jrq|	jpld	|j|	_|	||<nX|d
kr�||||�d��}
|
dur�td||f��|jr�|
|j7}
|r�||d}	|	jp�d	|
|	_n|jp�d	|
|_||=qtd|��|jt
kr�td
|j��t	|||||�|d7}|t|�ksdSdS)Nrrrrzrecursive include of %sz5maximum xinclude depth reached when including file %szcannot load %r as %rr��textrz)unknown parse type in xi:include tag (%r)z0xi:fallback tag must be child of xi:include (%r))�len�tag�XINCLUDE_INCLUDE�getrrr�add�copyr �remove�tailr'�XINCLUDE_FALLBACK)r"r#r$r%Z
_parent_hrefs�i�errZnoder'r
r
rr �sf


�


�



�
�
��r )N)r-r&rZurllib.parserZXINCLUDEr*r0ZDEFAULT_MAX_INCLUSION_DEPTH�SyntaxErrorrrrrr r
r
r
r�<module>s2

�

?>