관리-도구
편집 파일: ElementInclude.cpython-310.pyc
o 6��f� � @ s~ d dl Z ddlmZ d dlmZ dZed Zed ZdZG d d � d e �Z G dd� de �Zdd d�Zddefdd�Z dd� ZdS )� N� )�ElementTree)�urljoinz!{http://www.w3.org/2001/XInclude}�includeZfallback� c @ � e Zd ZdS )�FatalIncludeErrorN��__name__� __module__�__qualname__� r r �?/opt/alt/python310/lib64/python3.10/xml/etree/ElementInclude.pyr C � r c @ r )�LimitedRecursiveIncludeErrorNr r r r r r G r r c C s� |dkr#t | d��}t�|��� }W d � |S 1 sw Y |S |s'd}t | d|d�� }|�� }W d � |S 1 s>w Y |S )N�xml�rbzUTF-8�r)�encoding)�openr �parse�getroot�read)�hrefr r �file�datar r r �default_loaderW s ��� ��r c C sV |d u rd}n |dk rt d| ��t| d�r| �� } |d u r t}t| |||t� � d S )N���r z;expected non-negative depth or None for 'max_depth', got %rr )� ValueError�hasattrr r �_include�set)�elem�loader�base_url� max_depthr r r r t s c C s� d}|t | �k r�| | }|jtkr�|�d�}|rt||�}|�dd�}|dkrv||v r1td| ��|dkr;td| ��|�|� |||�} | d u rQtd||f ��t�| �} t | |||d |� |� |� |jrq| jpld |j | _| | |<