/usr/lib64/python3.12/xml/sax/__pycache__
NameSizeModeActions
expatreader.cpython-312.opt-1.pyc215830644editdlrm
expatreader.cpython-312.opt-2.pyc211890644editdlrm
expatreader.cpython-312.pyc215830644editdlrm
handler.cpython-312.opt-1.pyc148910644editdlrm
handler.cpython-312.opt-2.pyc58650644editdlrm
handler.cpython-312.pyc148910644editdlrm
saxutils.cpython-312.opt-1.pyc195950644editdlrm
saxutils.cpython-312.opt-2.pyc179880644editdlrm
saxutils.cpython-312.pyc195950644editdlrm
xmlreader.cpython-312.opt-1.pyc195470644editdlrm
xmlreader.cpython-312.opt-2.pyc134110644editdlrm
xmlreader.cpython-312.pyc195470644editdlrm
_exceptions.cpython-312.opt-1.pyc62190644editdlrm
_exceptions.cpython-312.opt-2.pyc36990644editdlrm
_exceptions.cpython-312.pyc62190644editdlrm
__init__.cpython-312.opt-1.pyc37870644editdlrm
__init__.cpython-312.opt-2.pyc27360644editdlrm
__init__.cpython-312.pyc37870644editdlrm
Edit: /usr/lib64/python3.12/xml/sax/__pycache__/saxutils.cpython-312.pyc (19595B)
{|j/dZddlZddlZddlZddlZddlZddlmZddlm Z dZ ifdZ ifdZ ifd Z d ZGd d ejZGd de j"ZddZy)znA library of useful helper classes to the SAX classes, for the convenience of application and driver writers. N)handler) xmlreadercZ|jD]\}}|j||}|S)z2Replace substrings of a string using a dictionary.)itemsreplace)sdkeyvalues )/usr/lib64/python3.12/xml/sax/saxutils.py__dict_replacer s+ggi U IIc5 ! Hc|jdd}|jdd}|jdd}|r t||}|S)zEscape &, <, 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. &&>><<rrdataentitiess r escapersH <<W %D <<V $D <<V $DdH- Krc|jdd}|jdd}|r t||}|jddS)a Unescape &, <, and > 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"sD << $D << $DdH- << %%rci|dddd}t||}d|vr"d|vrd|jddz}|Sd |z}|Sd|z}|S) aEscape 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 z z )   "'z"%s"z"z'%s')rrrs r quoteattrr$0spG(F'vFH $ !D d{ $;DLLh77D KD=D K} Krcddl}|jSttjrStt j t jfrSttjrGfdd}|}d|_ nPtj}d|_ j|_ j|_ j|_tj ||ddd S#t$rY%wxYw) Nrc2eZdZWjZfdZy) _gettextwriter.._wrapperct|SN)getattr)selfnameouts r __getattr__z,_gettextwriter.._wrapper.__getattr__ZssD))rN)__name__ __module__ __qualname__ __class__r.)r-sr _wrapperr'Xs I *rr3cyr)r5rr z _gettextwriter..]strcy)NTr5r5rr r6z _gettextwriter..bs$rxmlcharrefreplacerT)encodingerrorsnewline write_through)sysstdout isinstanceio TextIOBasecodecs StreamWriterStreamReaderWriter RawIOBasecloseBufferedIOBasewritablewriteseekabletellAttributeError TextIOWrapper)r-r9r=r3buffers` r _gettextwriterrOGs {zz#r}}% #++V-F-FGH #r||$ * *# ""$&yy  "llFO((FK   FX#6$(*. 00   s"C<< DDcdeZdZddZdZddZdZdZdZdZ d Z d Z d Z d Z d ZdZdZy) XMLGeneratorNctjj|t||}|j|_|j |_ig|_|jd|_ g|_ ||_ ||_ d|_ y)NF)rContentHandler__init__rOrI_writeflush_flush _ns_contexts_current_context_undeclared_ns_maps _encoding_short_empty_elements_pending_start_element)r+r-r9short_empty_elementss r rUzXMLGenerator.__init__rst''-S(+ii ii D $ 1 1" 5#% !%9"&+#rct|dr/d|dk(rd|dzS|j|d}|r |dz|dzS|dS)z7Builds a qualified name from a (ns_url, localname) pairrz$http://www.w3.org/XML/1998/namespacezxml:r:)rZ)r+r,prefixs r _qnamezXMLGenerator._qname~sY 7 6a@Q''**473F|d1g--AwrcN|jr|jdd|_yy)NrFr^rV)r+ endElements r _finish_pending_start_elementz*XMLGenerator._finish_pending_start_elements$  & & KK */D ' 'rc@|jd|jzy)Nz$ )rVr\r+s r startDocumentzXMLGenerator.startDocuments ;' (rc$|jyr))rXris r endDocumentzXMLGenerator.endDocuments  rc|jj|jj||j|<|jj||fyr))rYappendrZcopyr[r+rburis r startPrefixMappingzXMLGenerator.startPrefixMappingsM   !6!6!;!;!=>%+c"   '' 6rcF|jd|_|jd=y)NrS)rYrZr+rbs r endPrefixMappingzXMLGenerator.endPrefixMappings# $ 1 1" 5   b !rc |j|jd|z|jD]%\}}|jd|dt|'|jrd|_y|jdy)Nr =Tr)rgrVrr$r]r^)r+r,attrsr s r startElementzXMLGenerator.startElementse **, C$J"[[]MT5 KKD)E*:; <+  % %*.D ' KK rcv|jr|jdd|_y|jd|zyNz/>Fzrer+r,s r rfzXMLGenerator.endElements/  & & KK */D ' KK$ 'rc |j|jd|j|z|jD]4\}}|r|jd|d|d!|jd|z6g|_|j D]4\}}|jd|j|dt |6|j rd|_y|jd y) Nrz xmlns:z="r"z xmlns="%s"rwrxTr)rgrVrcr[rr$r]r^)r+r,qnameryrbrqr s r startElementNSzXMLGenerator.startElementNSs **, C$++d++,33KFC <= MC/0 4 $& "[[]MT5 KKDKK$5y7GH I+  % %*.D ' KK rc|jr|jdd|_y|jd|j|zyr|)r^rVrcr+r,rs r endElementNSzXMLGenerator.endElementNSs9  & & KK */D ' KK$++d"33 4rc|rQ|jt|tst||j}|j t |yyr))rgr?strr\rVrr+contents r characterszXMLGenerator.characterss@   . . 0gs+gt~~6 KKw ( rc|rH|jt|tst||j}|j |yyr))rgr?rr\rVrs r ignorableWhitespacez XMLGenerator.ignorableWhitespaces<   . . 0gs+gt~~6 KK rcT|j|jd|d|dy)Nz)rgrVr+targetrs r processingInstructionz"XMLGenerator.processingInstructions **, 6401r)Nz iso-8859-1F)F)r/r0r1rUrcrgrjrlrrrurzrfrrrrrr5rr rQrQpsH ,"0(7 "($5)!2rrQceZdZdZddZdZdZdZdZdZ d Z d Z d Z d Z d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZy) XMLFilterBaseaYThis 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.NcPtjj|||_yr))r XMLReaderrU_parentr+parents r rUzXMLFilterBase.__init__s$$T* rc:|jj|yr)) _err_handlererrorr+ exceptions r rzXMLFilterBase.errors  *rc:|jj|yr))r fatalErrorrs r rzXMLFilterBase.fatalErrors $$Y/rc:|jj|yr))rwarningrs r rzXMLFilterBase.warnings !!),rc:|jj|yr)) _cont_handlersetDocumentLocator)r+locators r rz XMLFilterBase.setDocumentLocators --g6rc8|jjyr))rrjris r rjzXMLFilterBase.startDocuments ((*rc8|jjyr))rrlris r rlzXMLFilterBase.endDocuments &&(rc<|jj||yr))rrrrps r rrz XMLFilterBase.startPrefixMappings --fc:rc:|jj|yr))rrurts r ruzXMLFilterBase.endPrefixMappings ++F3rc<|jj||yr))rrz)r+r,rys r rzzXMLFilterBase.startElement  ''e4rc:|jj|yr))rrfr}s r rfzXMLFilterBase.endElements %%d+rc>|jj|||yr))rr)r+r,rrys r rzXMLFilterBase.startElementNSs ))$u=rc<|jj||yr))rrrs r rzXMLFilterBase.endElementNSrrc:|jj|yr))rrrs r rzXMLFilterBase.characterss %%g.rc:|jj|yr))rr)r+charss r rz!XMLFilterBase.ignorableWhitespaces ..u5rc<|jj||yr))rrrs r rz#XMLFilterBase.processingInstructions 00>rc:|jj|yr))r skippedEntityr}s r rzXMLFilterBase.skippedEntity s ((.rc>|jj|||yr)) _dtd_handler notationDecl)r+r,publicIdsystemIds r rzXMLFilterBase.notationDecl%s &&tXx@rc@|jj||||yr))runparsedEntityDecl)r+r,rrndatas r rz XMLFilterBase.unparsedEntityDecl(s ,,T8XuMrc:|jj||Sr)) _ent_handler resolveEntity)r+rrs r rzXMLFilterBase.resolveEntity-s  ..xBBrc|jj||jj||jj||jj ||jj |yr))rsetContentHandlersetErrorHandlersetEntityResolver setDTDHandlerparse)r+sources r rzXMLFilterBase.parse2s\ &&t, $$T* &&t, ""4( 6"rc:|jj|yr))r setLocale)r+locales r rzXMLFilterBase.setLocale9s v&rc8|jj|Sr))r getFeaturer}s r rzXMLFilterBase.getFeature<s||&&t,,rc<|jj||yr))r setFeature)r+r,states r rzXMLFilterBase.setFeature?s e,rc8|jj|Sr))r getPropertyr}s r rzXMLFilterBase.getPropertyBs||''--rc<|jj||yr))r setProperty)r+r,r s r rzXMLFilterBase.setPropertyEs   u-rc|jSr)rris r getParentzXMLFilterBase.getParentJs ||rc||_yr)rrs r setParentzXMLFilterBase.setParentMs  rr)) r/r0r1__doc__rUrrrrrjrlrrrurzrfrrrrrrrrrrrrrrrrrr5rr rrs +0- 7+);45,>5/6?/ AN C #'--.. rrcjt|tjrtj|}t|trt j |}nt|dr|}t j }t|jdtr|j|n|j|t|dr5t|jtr|j|j|j'|j|j}tj j#tj j%|}tj j'||}tj j)|r|j|t+|d}n\|jt,j.j1||t,j2j5|j}|j||S)zThis function takes an InputSource and an optional base URL and returns a fully resolved InputSource object ready for reading.readrr,rb)r?osPathLikefspathrr InputSourcehasattrrsetCharacterStream setByteStreamr, setSystemIdgetCharacterStream getByteStream getSystemIdpathdirnamenormpathjoinisfileopenurllibrurljoinrequesturlopen)rbasefsysidbasehead sysidfilenames r prepare_input_sourcerRs&"++&6"&#&&v.  &&( affQi %  % %a (   # 1f *QVVS"9   qvv &   "*v/C/C/E/M""$77??277#3#3D#9: Xu5 77>>- (   } -]D)A   v||33D%@ A&&v'9'9';rsv ('    & .'0Rp27))p2fkI''k^r