ok

Mini Shell

Direktori : /opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/
Upload File :
Current File : //opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pyc

�
[��ec@s+ddlZddlZddlZyddlZejZWnddlZejZnXidd6dd6dd6ZdZedZedZ	d	�Z
d
gdddd
�Zedddedddddd.d/d0g�ej
e
�edddedddddd1d2g�edddede	�edddede	dd �dddd3d4g�edd#dede	dddd5d6d7g�edd$dd%ddd&d'd(d)�yxer�ej�q�WWnek
r�nXedd*dd%dddddd8d9d:g�d,GHejd-�dS(;i����Nsa<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <rewriteSystem systemIdStartString="http://example.com/dtds/" rewritePrefix="../dtds/"/>
</catalog>scatalogs/catalog.xmls<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE root SYSTEM "http://example.com/dtds/sample.dtd">
<root>&sample.entity;</root>sxml/sample.xmlsE
<!ELEMENT root (#PCDATA)>
<!ENTITY sample.entity "replacement text">sdtds/sample.dtds
py://strings/cCsA|jt�sdS|tt�}|tkr3dStt|�S(N(t
startswithtprefixtNonetlent	pystringststr_io(tURItpath((sJ/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pytmy_input_cb'stverifiedtrootsreplacement textcs�tjtjBtjB}g��fd�}	�fd�}
tj|	d�y�tj||�}|j|
d�|dk	r�|j|�n|dk	r�|�n|j	�|j
�}d}
|j�}|j|kr�|j
|kr�d}
n|j�Wntjk
rd}
nX|
|krGd|||
fGHtjd�n{�|kr�d|GHd	GHx#|D]\}}d
||fGHqhWdGHx#�D]\}}d
||fGHq�Wtjd�ndS(Ncs�jd|f�dS(Ni����(tappend(tctxtmsg(t
actual_err(sJ/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pytmy_global_error_cb5scs�j||f�dS(N(R(targR
tseveritytreserved(R(sJ/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pytmy_ctx_error_cb7stloadedR	s
not loadeds1Test '%s' failed: expect status '%s', actual '%s'isTest '%s' failedsExpect errors:s  [%2d] '%s'sActual errors:(tlibxml2tXML_PARSE_DTDLOADtXML_PARSE_NONETtXML_PARSE_COMPACTtregisterErrorHandlerRtcreateURLParserCtxttsetErrorHandlertaddLocalCatalogt
parseDocumenttdoctgetRootElementtnametcontenttfreeDoctparserErrortsystexit(tdesctdocpathtcatalogt
exp_statustexp_errt
test_callbackt	root_nametroot_contenttoptsRRtparserRt
actual_statustetstm((RsJ/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pytrun_test0sB

	
	R&s&Loading entity without custom callbackR'R(R)s
not loadedR*sI/O s
warning : s=failed to load external entity "py://strings/xml/sample.xml"
s#Loading entity with custom callbackRsAAttempt to load network entity http://example.com/dtds/sample.dtdis#Entity 'sample.entity' not defined
s/Loading entity with custom callback and catalogs)Loading entity and unregistering callbackR+cCs
tj�S(N(RtpopInputCallbacks(((sJ/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pyt<lambda>qsis>failed to load external entity "py://strings/dtds/sample.dtd"
s3Retry loading document after unregistering callbacks7Loading using standard i/o after unregistering callbackstst.xmlR,RR-tbars<Loading using standard i/o after unregistering all callbackss)failed to load external entity "tst.xml"
tOKi(i����sI/O (i����s
warning : (i����s=failed to load external entity "py://strings/xml/sample.xml"
(i����sAAttempt to load network entity http://example.com/dtds/sample.dtd(is#Entity 'sample.entity' not defined
(is>failed to load external entity "py://strings/dtds/sample.dtd"
(is#Entity 'sample.entity' not defined
(i����sI/O (i����s
warning : (i����s=failed to load external entity "py://strings/xml/sample.xml"
(i����sI/O (i����s
warning : (i����s)failed to load external entity "tst.xml"
(R$t
setup_testRtStringIORtioRRtstartURLtcatURLRRR4tregisterInputCallbacktTrueR5t
IndexErrorR%(((sJ/opt/cpanel/ea-libxml2/share/doc/libxml2/python/examples/input_callback.pyt<module>sx




			(



	


	



Zerion Mini Shell 1.0