Your IP : 3.145.102.112


Current Path : /opt/alt/python313/lib64/python3.13/xml/sax/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/xml/sax/__pycache__/saxutils.cpython-313.opt-1.pyc

�

2}g�/����SrSSKrSSKrSSKrSSKrSSKrSSKJr SSKJ	r	 Sr
04Sjr04Sjr04S	jr
S
r"SS\R5r"S
S\	R"5rSSjrg)znA library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
�N�)�handler)�	xmlreaderc�Z�UR5Hup#URX#5nM U$)z2Replace substrings of a string using a dictionary.)�items�replace)�s�d�key�values    �7/opt/alt/python313/lib64/python3.13/xml/sax/saxutils.py�__dict_replacers'���g�g�i�
��
�I�I�c�!�� ��H�c��URSS5nURSS5nURSS5nU(a[X5nU$)z�Escape &, <, and > in a string of data.

You can escape other strings of data by passing a dictionary as
the optional entities parameter.  The keys and values must all be
strings; each key will be replaced with its corresponding value.
�&�&amp;�>�&gt;�<�&lt;�rr��data�entitiess  r
�escapersF���<�<��W�%�D��<�<��V�$�D��<�<��V�$�D���d�-���Krc��URSS5nURSS5nU(a[X5nURSS5$)z�Unescape &amp;, &lt;, and &gt; in a string of data.

You can unescape other strings of data by passing a dictionary as
the optional entities parameter.  The keys and values must all be
strings; each key will be replaced with its corresponding value.
rrrrrrrrs  r
�unescaper"sB���<�<���$�D��<�<���$�D���d�-���<�<���%�%rc��0UESSSS.En[X5nSU;a%SU;aSURSS5-nU$S	U-nU$SU-nU$)
awEscape and quote an attribute value.

Escape &, <, and > in a string of data, then quote it for use as
an attribute value.  The " character will be escaped as well, if
necessary.

You can escape other strings of data by passing a dictionary as
the optional entities parameter.  The keys and values must all be
strings; each key will be replaced with its corresponding value.
z&#10;z&#13;z&#9;)�
�
�	�"�'z"%s"z&quot;z'%s')rrrs  r
�	quoteattrr$0sn��G�(�F�'��v�F�H��$�!�D�
�d�{��$�;��D�L�L��h�7�7�D�
�K��D�=�D��K���}���Krc�6^�TcSSKnUR$[T[R5(aT$[T[
R[
R45(aT$[T[R5(a"U4SjS5nU"5nSUl	OQ[R"5nSUlTRUlTRUl
TRUl[R "XASSSS	9$![a N#f=f)
Nrc�<>�\rSrSrYRrU4SjrSrg)� _gettextwriter.<locals>._wrapper�Xc�>�[TU5$�N)�getattr)�self�name�outs  �r
�__getattr__�,_gettextwriter.<locals>._wrapper.__getattr__Zs����s�D�)�)r�N)�__name__�
__module__�__qualname__�__firstlineno__�	__class__r/�__static_attributes__)r.s�r
�_wrapperr'Xs����
�
�I�
*�
*rr8c��gr*r1r1rr
�<lambda>� _gettextwriter.<locals>.<lambda>]s��trc��g)NTr1r1rr
r:r;bs��$r�xmlcharrefreplacerT)�encoding�errors�newline�
write_through)�sys�stdout�
isinstance�io�
TextIOBase�codecs�StreamWriter�StreamReaderWriter�	RawIOBase�close�BufferedIOBase�writable�write�seekable�tell�AttributeError�
TextIOWrapper)r.r>rBr8�buffers`    r
�_gettextwriterrTGs����
�{���z�z���#�r�}�}�%�%��
��#��+�+�V�-F�-F�G�H�H��
��#�r�|�|�$�$�	*�	*����#����"�"�$��&����y�y���	�"�l�l�F�O��(�(�F�K����F�#6�$(�*.�0�0���	��	�s�"D�
D�Dc�p�\rSrSrSSjrSrSSjrSrSrSr	S	r
S
rSrSr
S
rSrSrSrSrg)�XMLGenerator�pNc��[RRU5 [X5nURUlURUl0/UlURSUl	/Ul
X lX0lSUl
g)N���F)r�ContentHandler�__init__rTrN�_write�flush�_flush�_ns_contexts�_current_context�_undeclared_ns_maps�	_encoding�_short_empty_elements�_pending_start_element)r,r.r>�short_empty_elementss    r
r[�XMLGenerator.__init__rsn�����'�'��-��S�+���i�i����i�i����D��� $� 1� 1�"� 5���#%�� �!��%9�"�&+��#rc��US(a5SUS:XaSUS-$URUSnU(aUS-US-$US$)z7Builds a qualified name from a (ns_url, localname) pairrz$http://www.w3.org/XML/1998/namespacezxml:r�:)r`)r,r-�prefixs   r
�_qname�XMLGenerator._qname~sY����7�
6��a��@���Q��'�'��*�*�4��7�3�F����|�d�1�g�-�-��A�w�rc�X�UR(aURS5 SUlgg)NrF�rdr\)r,�
endElements  r
�_finish_pending_start_element�*XMLGenerator._finish_pending_start_element�s$���&�&��K�K���*/�D�'�'rc�@�URSUR-5 g)Nz$<?xml version="1.0" encoding="%s"?>
)r\rb�r,s r
�
startDocument�XMLGenerator.startDocument�s�����;����'�	(rc�$�UR5 gr*)r^rrs r
�endDocument�XMLGenerator.endDocument�s�����
rc��URRURR55 XRU'URRX45 gr*)r_�appendr`�copyra�r,ri�uris   r
�startPrefixMapping�XMLGenerator.startPrefixMapping�sI����� � ��!6�!6�!;�!;�!=�>�%+���c�"�� � �'�'��
�6rc�F�URSUlURS	g)NrY)r_r`�r,ris  r
�endPrefixMapping�XMLGenerator.endPrefixMapping�s#�� $� 1� 1�"� 5������b�!rc	��UR5 URSU-5 UR5H'upURSU<S[U5<35 M) UR(aSUlgURS5 g)Nr� �=Tr)ror\rr$rcrd)r,r-�attrsrs    r
�startElement�XMLGenerator.startElement�sc���*�*�,����C�$�J��"�[�[�]�M�T��K�K�D�)�E�*:�;�<�+��%�%�*.�D�'��K�K��rc��UR(aURS5 SUlgURSU-5 g�Nz/>Fz</%s>rm�r,r-s  r
rn�XMLGenerator.endElement�s/���&�&��K�K���*/�D�'��K�K��$��'rc	��UR5 URSURU5-5 URH<upEU(aURSU<SU<S35 M(URSU-5 M> /UlUR	5H6upURSURU5<S[U5<35 M8 UR(aSUlgURS	5 g)
Nrz xmlns:z="r"z xmlns="%s"r�r�Tr)ror\rjrarr$rcrd)r,r-�qnamer�rir|rs       r
�startElementNS�XMLGenerator.startElementNS�s����*�*�,����C�$�+�+�d�+�+�,��3�3�K�F�������<�=����M�C�/�0�	4�
$&�� �"�[�[�]�M�T��K�K�D�K�K��$5�y��7G�H�I�+��%�%�*.�D�'��K�K��rc��UR(aURS5 SUlgURSURU5-5 gr�)rdr\rj�r,r-r�s   r
�endElementNS�XMLGenerator.endElementNS�s9���&�&��K�K���*/�D�'��K�K��$�+�+�d�"3�3�4rc��U(aUUR5 [U[5(d[XR5nUR	[U55 ggr*)rorD�strrbr\r�r,�contents  r
�
characters�XMLGenerator.characters�sA����.�.�0��g�s�+�+��g�~�~�6���K�K��w��(�	rc��U(aLUR5 [U[5(d[XR5nUR	U5 ggr*)rorDr�rbr\r�s  r
�ignorableWhitespace� XMLGenerator.ignorableWhitespace�s=����.�.�0��g�s�+�+��g�~�~�6���K�K�� �	rc�X�UR5 URSU<SU<S35 g)Nz<?r�z?>)ror\�r,�targetrs   r
�processingInstruction�"XMLGenerator.processingInstruction�s���*�*�,����6�4�0�1r)r`rbr^r_rdrcrar\)Nz
iso-8859-1F)F)r2r3r4r5r[rjrorsrvr}r�r�rnr�r�r�r�r�r7r1rr
rVrVpsH��
,��"0�(��7�
"��(��$5�)�!�2rrVc���\rSrSrSrS!SjrSrSrSrSr	S	r
S
rSrSr
S
rSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSrSr S r!g)"�
XMLFilterBase��aEThis class is designed to sit between an XMLReader and the
client application's event handlers.  By default, it does nothing
but pass requests up to the reader and events on to the handlers
unmodified, but subclasses can override specific methods to modify
the event stream or the configuration requests as they pass
through.Nc�N�[RRU5 Xlgr*)r�	XMLReaderr[�_parent�r,�parents  r
r[�XMLFilterBase.__init__�s�����$�$�T�*��rc�:�URRU5 gr*)�_err_handler�error�r,�	exceptions  r
r��XMLFilterBase.error�s�������	�*rc�:�URRU5 gr*)r��
fatalErrorr�s  r
r��XMLFilterBase.fatalError�s�����$�$�Y�/rc�:�URRU5 gr*)r��warningr�s  r
r��XMLFilterBase.warning�s�����!�!�)�,rc�:�URRU5 gr*)�
_cont_handler�setDocumentLocator)r,�locators  r
r�� XMLFilterBase.setDocumentLocator�s�����-�-�g�6rc�8�URR5 gr*)r�rsrrs r
rs�XMLFilterBase.startDocument�s�����(�(�*rc�8�URR5 gr*)r�rvrrs r
rv�XMLFilterBase.endDocuments�����&�&�(rc�:�URRX5 gr*)r�r}r{s   r
r}� XMLFilterBase.startPrefixMappings�����-�-�f�:rc�:�URRU5 gr*)r�r�r�s  r
r��XMLFilterBase.endPrefixMappings�����+�+�F�3rc�:�URRX5 gr*)r�r�)r,r-r�s   r
r��XMLFilterBase.startElement������'�'��4rc�:�URRU5 gr*)r�rnr�s  r
rn�XMLFilterBase.endElements�����%�%�d�+rc�<�URRXU5 gr*)r�r�)r,r-r�r�s    r
r��XMLFilterBase.startElementNSs�����)�)�$�u�=rc�:�URRX5 gr*)r�r�r�s   r
r��XMLFilterBase.endElementNSr�rc�:�URRU5 gr*)r�r�r�s  r
r��XMLFilterBase.characterss�����%�%�g�.rc�:�URRU5 gr*)r�r�)r,�charss  r
r��!XMLFilterBase.ignorableWhitespaces�����.�.�u�5rc�:�URRX5 gr*)r�r�r�s   r
r��#XMLFilterBase.processingInstructions�����0�0��>rc�:�URRU5 gr*)r��
skippedEntityr�s  r
r��XMLFilterBase.skippedEntity s�����(�(��.rc�<�URRXU5 gr*)�_dtd_handler�notationDecl)r,r-�publicId�systemIds    r
r��XMLFilterBase.notationDecl%s�����&�&�t�x�@rc�<�URRXX45 gr*)r��unparsedEntityDecl)r,r-r�r��ndatas     r
r�� XMLFilterBase.unparsedEntityDecl(s�����,�,�T�X�Mrc�8�URRX5$r*)�_ent_handler�
resolveEntity)r,r�r�s   r
r��XMLFilterBase.resolveEntity-s��� � �.�.�x�B�Brc��URRU5 URRU5 URRU5 URR	U5 URRU5 gr*)r��setContentHandler�setErrorHandler�setEntityResolver�
setDTDHandler�parse)r,�sources  r
r��XMLFilterBase.parse2s\�����&�&�t�,����$�$�T�*����&�&�t�,����"�"�4�(������6�"rc�:�URRU5 gr*)r��	setLocale)r,�locales  r
r��XMLFilterBase.setLocale9s�������v�&rc�8�URRU5$r*)r��
getFeaturer�s  r
r��XMLFilterBase.getFeature<s���|�|�&�&�t�,�,rc�:�URRX5 gr*)r��
setFeature)r,r-�states   r
r��XMLFilterBase.setFeature?s��������,rc�8�URRU5$r*)r��getPropertyr�s  r
r��XMLFilterBase.getPropertyBs���|�|�'�'��-�-rc�:�URRX5 gr*)r��setProperty)r,r-rs   r
r��XMLFilterBase.setPropertyEs����� � ��-rc��UR$r*�r�rrs r
�	getParent�XMLFilterBase.getParentJs���|�|�rc��Xlgr*rr�s  r
�	setParent�XMLFilterBase.setParentMs���rrr*)"r2r3r4r5�__doc__r[r�r�r�r�rsrvr}r�r�rnr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rrr7r1rr
r�r��s�����+�0�-�
7�+�)�;�4�5�,�>�5�/�6�?�/�
A�N�
C�
#�'�-�-�.�.�
�rr�c��[U[R5(a[R"U5n[U[5(a[
R"U5nO�[US5(a�Un[
R"5n[URS5[5(aURU5 OURU5 [US5(a:[UR[5(aURUR5 UR5Gc+UR5GcUR5n[R R#[R R%U55n[R R'XC5n[R R)U5(aURU5 [+US5nO[UR[,R.R1X55 [,R2R5UR55nURU5 U$)z~This function takes an InputSource and an optional base URL and
returns a fully resolved InputSource object ready for reading.�readrr-�rb)rD�os�PathLike�fspathr�r�InputSource�hasattrr�setCharacterStream�
setByteStreamr-�setSystemId�getCharacterStream�
getByteStream�getSystemId�path�dirname�normpath�join�isfile�open�urllibr��urljoin�request�urlopen)r��base�f�sysid�basehead�
sysidfilenames      r
�prepare_input_sourcer$Rs����&�"�+�+�&�&����6�"���&�#����&�&�v�.��	���	 �	 ����&�&�(���a�f�f�Q�i��%�%��%�%�a�(�� � ��#��1�f���*�Q�V�V�S�"9�"9����q�v�v�&�
� � �"�*�v�/C�/C�/E�/M��"�"�$���7�7�?�?�2�7�7�#3�#3�D�#9�:�������X�5�
�
�7�7�>�>�-�(�(����}�-��]�D�)�A����v�|�|�3�3�D�@�A����&�&�v�'9�'9�';�<�A����Q���Mr)�)rr
�urllib.parser�urllib.requestrErGr%rrrrrr$rTrZrVr�r�r$r1rr
�<module>r(sv���
(�'�	�
���
��� �&� ��.'0�Rp2�7�)�)�p2�fk�I�'�'�k�^r

?>