%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib64/python2.7/xml/dom/
Upload File :
Create Path :
Current File : //lib64/python2.7/xml/dom/expatbuilder.pyc

�
{fc@s�dZddlmZmZmZddlmZmZmZddlm	Z	ddl
mZmZddl
mZddlTejZejZejZejjZejjZejjZejjZej�Zi	ejed�d	6ejed
�d6ejed�d
6ejed�d6ejed�d6ejed�d6ejed�d6ejed�d6ejed�d6Zdefd��YZd�Zd�Z dfd��YZ!eeefZ"d efd!��YZ#d"efd#��YZ$d$e$fd%��YZ%d&e$fd'��YZ&d(Z'd)e'Z(d*e!fd+��YZ)d,fd-��YZ*d.e*e!fd/��YZ+d0e*e)fd1��YZ,d2e-fd3��YZ.d4e!fd5��YZ/e0d6�Z1e0d7�Z2e0d8�Z3e0d9�Z4d:�Z5d;S(<s�Facility to use the Expat parser to load a minidom instance
from a string or file.

This avoids all the overhead of SAX and pulldom to gain performance.
i����(t
xmlbuildertminidomtNode(tEMPTY_NAMESPACEtEMPTY_PREFIXtXMLNS_NAMESPACE(texpat(t
_append_childt_set_attribute_node(t
NodeFilter(t*tcdatatCDATAtenumerationtENUMtentitytENTITYtentitiestENTITIEStidtIDtidreftIDREFtidrefstIDREFStnmtokentNMTOKENtnmtokenstNMTOKENStElementInfocBsbeZdZd
d�Zd�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�ZRS(t
_attr_infot_modelttagNamecCs||_g|_||_dS(N(R RR(tselfR tmodel((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt__init__As		cCs|j|j|jfS(N(RRR (R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt__getstate__FscCs|\|_|_|_dS(N(RRR (R!tstate((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt__setstate__IscCs\xR|jD]G}|d|kr
|d}|ddkrBtdSt|dSq
q
WtjS(Nii����it(R(Rt
_typeinfo_mapRt_no_type(R!tanametinfott((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytgetAttributeTypeLs
cCstjS(N(RR)(R!tnamespaceURIt	localName((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytgetAttributeTypeNSVscCs:|jr2|jd}|tjjtjjfkStSdS(Ni(RRR"t
XML_CTYPE_ANYtXML_CTYPE_MIXEDtFalse(R!ttype((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisElementContentYs
	
cCs(|jr |jdtjjkStSdS(Ni(RRR"tXML_CTYPE_EMPTYR3(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisEmptyas	cCs6x/|jD]$}|d|kr
|ddkSq
WtS(Nii����R(RR3(R!R*R+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisIdgscCs|j||f�S(N(R8(R!teuritenametauriR*((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytisIdNSms(RRR N(
t__name__t
__module__t	__slots__tNoneR#R$R&R-R0R5R7R8R<(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR>s			
				cCs|j||�S(N(t_intern_setdefault(tbuilderts((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt_internqscCs�d|kst�|jd�}|j}t|�dkr�|\}}}|||�}d||f}|||�}|||�}n%|\}}t}|||�}}|||�|||fS(Nt is%s:%s(tAssertionErrortsplitRAtlenR(RBtnametpartstinternturit	localnametprefixtqname((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt_parse_ns_namets	tExpatBuildercBs
eZdZdd�Zd�Zd�Zd�Zd�Zd�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�ZRS(sPDocument builder that uses Expat to build a ParsedXML.DOM document
    instance.cCsw|dkrtj�}n||_|jjdk	rNt|jj�|_nd|_t|_d|_	|j
�dS(N(R@RtOptionst_optionstfiltertFilterVisibilityControllert_filterRt_finish_start_elementt_parsertreset(R!toptions((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#�s				cCs
tj�S(sCreate a new parser object.(RtParserCreate(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytcreateParser�scCsh|jsa|j�|_|jjj|_t|j_t|j_t|j_|j	|j�n|jS(s7Return the parser object, creating a new one if needed.(
RXR\RKt
setdefaultRAtTruetbuffer_texttordered_attributestspecified_attributestinstall(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt	getParser�s	cCs@tjtdd�|_|j|_|jj|_t|_dS(s6Free all data structures used during DOM construction.N(	ttheDOMImplementationtcreateDocumentRR@tdocumenttcurNodet
_elem_infoR3t_cdata(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRY�s
cCs�|j|_|j|_|j|_|j|_|jj	rK|j
|_n|j|_
|jjrr|j|_n|jjr�|j|_|j|_|j|_n|j|_|j|_|j|_|j|_|j|_ dS(s>Install the callbacks needed to build the DOM into the parser.N(!tstart_doctype_decl_handlertStartDoctypeDeclHandlertfirst_element_handlertStartElementHandlertend_element_handlertEndElementHandlert
pi_handlertProcessingInstructionHandlerRSRtentity_decl_handlertEntityDeclHandlertnotation_decl_handlertNotationDeclHandlertcommentstcomment_handlertCommentHandlertcdata_sectionststart_cdata_section_handlertStartCdataSectionHandlertend_cdata_section_handlertEndCdataSectionHandlertcharacter_data_handler_cdatatCharacterDataHandlertcharacter_data_handlertexternal_entity_ref_handlertExternalEntityRefHandlertxml_decl_handlertXmlDeclHandlertelement_decl_handlertElementDeclHandlertattlist_decl_handlertAttlistDeclHandler(R!tparser((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRb�s$cCs�|j�}t}ylxU|jd�}|s1Pn|j|d�|rc|jjrc|j|�nt}qW|jdt�Wntk
r�nX|j}|j	�d|_|S(sIParse a document from a file object, returning the document
        node.iiiti@N(RcR^treadtParseRftdocumentElementt
_setup_subsetR3tParseEscapeRYR@RX(R!tfileR�tfirst_buffertbuffertdoc((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt	parseFile�s$

	
	cCsa|j�}y!|j|t�|j|�Wntk
r@nX|j}|j�d|_|S(s<Parse a document from a string, returning the document node.N(	RcR�R^R�R�RfRYR@RX(R!tstringR�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytparseString�s
	
	cCsD|jjr@t�}|j|�|j�}||jj_ndS(s/Load the internal subset if there might be one.N(RftdoctypetInternalSubsetExtractorR�t	getSubsettinternalSubset(R!R�t	extractortsubset((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s
	
cCs�|jjj|||�}|j|_t|j|�||j_|jr�|jj|�tkr�d|j_|jj
d=d}d|j_d|j_
n|r�|dk	r�g|j_g|j_nd|j_d|j_|j|j_ndS(Ni����(RftimplementationtcreateDocumentTypet
ownerDocumentRR�RVt
acceptNodet
FILTER_REJECTR@t
childNodesRXRsRuRt_seqt	notationsRxRqtend_doctype_decl_handlertEndDoctypeDeclHandler(R!tdoctypeNametsystemIdtpublicIdthas_internal_subsetR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRj�s$!
cCsO|jjr|j|j_n|j|j_|jp<|jsKt	|_
ndS(N(RSRvRwRXRxRpRqRhRVRt_finish_end_element(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s
cCs]|jj||�}t|j|�|jrY|jj|�tkrY|jj|�ndS(N(RftcreateProcessingInstructionRRgRVR�R�tremoveChild(R!ttargettdatatnode((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRps!cCs�|jj}|jrd|jrF|djtkrF|dj|�dS|jj|�}t	|_n�|r�|djt
kr�|d}|j|}|j}||d<|d<dSt
j�}|j}||d<|d<|j|d<t|j|�dS(Ni����R�t	nodeValueR�(RgR�Rit_cdata_continuetnodeTypetCDATA_SECTION_NODEt
appendDataRftcreateCDATASectionR^t	TEXT_NODER�t__dict__RtTextR(R!R�R�R�tvaluetd((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR~s&		

		
cCs�|jj}|rU|djtkrU|d}|j}|j||d<|d<dStj�}|j}|j||d<|d<|j|d<t	|j|�dS(Ni����R�R�R�(
RgR�R�R�R�R�RR�RfR(R!R�R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�(s
		
c
Cs�|r
dS|jjsdS|jj||||�}|dk	rf|jj|�}	|jj|	�n|jjjj	j|�|j
r�|j
j|�tkr�|jjjj	d=ndS(Ni����(
RSRRft_create_entityR@tcreateTextNodeR�tappendR�R�RVR�R�(
R!t
entityNametis_parameter_entityR�tbaseR�R�tnotationNameR�tchild((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRr5s!cCsl|jj|||�}|jjjjj|�|jrh|jj|�tkrh|jjjjd=ndS(Ni����(	Rft_create_notationR�R�R�R�RVR�t
FILTER_ACCEPT(R!R�R�R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRtGs!cCsZ|jj|�}t|j|�|jrV|jj|�tkrV|jj|�ndS(N(Rft
createCommentRRgRVR�R�R�(R!R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRwMs!cCst|_t|_dS(N(R^RiR3R�(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRzSs	cCst|_t|_dS(N(R3RiR�(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR|Ws	cCsdS(Ni((R!tcontextR�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�[scCsK|jdkr%|jr%t|_n|j|j�_|j||�dS(N(RVR@RhRR�tstart_element_handlerRcRm(R!RIt
attributes((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRl^scCs�|jj|�}t|j|�||_|r�x�tdt|�d�D]�}tj||tdt
�}||d}|jdj}||d<|d<|j}||d<|d<|j|d<t
||�qJWn||jjk	r�|j|�ndS(NiiiR�R�R�R�(Rft
createElementRRgtrangeRHRtAttrRR@RR�R�RR�RW(R!RIR�R�titaR�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�ds 		
cCs�|jr�||jjkrdS|jj|�}|tkrJt|�n|tkrct|�ndS|j|_	|jj
|�|j�ndS(N(RVRfR�tstartContainerR�tRejectertFILTER_SKIPtSkippert
parentNodeRgR�tunlink(R!R�tfilt((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRWxs	

cCs&|j}|j|_|j|�dS(N(RgR�R�(R!RIRg((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRn�s	cCs�|jj|j�}|r.|j||�n|jr�||jjkrMdS|jj|�tkr�|j	j
|�|j�q�ndS(N(RhtgetR t_handle_white_text_nodesRVRfR�R�R�RgR�R�(R!RgR+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCs�|jjs|j�rdSg}x@|jD]5}|jtkr-|jj�r-|j|�q-q-Wx|D]}|j	|�qmWdS(N(
RStwhitespace_in_element_contentR5R�R�R�R�tstripR�R�(R!R�R+tLR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s

cCsY|jj|�}|dkr7t||�|j|<n|jdksLt�||_dS(N(RhR�R@RRRF(R!RIR"R+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s
c	Csf|jj|�}|dkr:t|�}||j|<n|jjd|dd|d||g�dS(Ni(RhR�R@RRR�(R!telemRIR4tdefaulttrequiredR+((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCsL||j_||j_|dkrH|r9t|j_qHt|j_ndS(Ni(RftversiontencodingR^t
standaloneR3(R!R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sN( R=R>t__doc__R@R#R\RcRYRbR�R�R�RjR�RpR~R�RrRtRwRzR|R�RlR�RWRnR�R�R�R�R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRQ�s:						
						
														RUcBs�eZdZdZd�Zd�Zd�Zieje	j
6eje	j6ej
e	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j6eje	j 6Z!RS(soWrapper around a DOMBuilderFilter which implements the checks
    to make the whatToShow filter attribute work.RTcCs
||_dS(N(RT(R!RT((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#�scCsu|j|j}|jj|@rm|jj|�}|tkrGt�n|tkritdt	|��n|St
SdS(Ns)startContainer() returned illegal value: (t_nodetype_maskR�RTt
whatToShowR�tFILTER_INTERRUPTR�t_ALLOWED_FILTER_RETURNSt
ValueErrortreprR�(R!R�tmasktval((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCs�|j|j}|jj|@r�|jj|�}|tkrGt�n|tkr�|j}x|j	D]}|j
|�qgWtS|tkr�t
dt|��n|StSdS(Ns%acceptNode() returned illegal value: (R�R�RTR�R�R�R�R�R�R�tappendChildR�R�R�R�R�(R!R�R�R�tparentR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s		(RT("R=R>R�R?R#R�R�R	tSHOW_ELEMENTRtELEMENT_NODEtSHOW_ATTRIBUTEtATTRIBUTE_NODEt	SHOW_TEXTR�tSHOW_CDATA_SECTIONR�tSHOW_ENTITY_REFERENCEtENTITY_REFERENCE_NODEtSHOW_ENTITYtENTITY_NODEtSHOW_PROCESSING_INSTRUCTIONtPROCESSING_INSTRUCTION_NODEtSHOW_COMMENTtCOMMENT_NODEt
SHOW_DOCUMENTt
DOCUMENT_NODEtSHOW_DOCUMENT_TYPEtDOCUMENT_TYPE_NODEtSHOW_DOCUMENT_FRAGMENTtDOCUMENT_FRAGMENT_NODEt
SHOW_NOTATIONt
NOTATION_NODER�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRU�s$		
	










tFilterCrutchcBseZdZd�ZRS(t_buildert_levelt
_old_startt_old_endcCsOd|_||_|j}|j|_|j|_|j|_|j|_dS(Ni(	RRRXRmRRoRR�Rn(R!RBR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#s			(RRRR(R=R>R?R#(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR	sR�cBs)eZdZd�Zd�Zd�ZRS(cCs>tj||�|j}xdD]}t||d�q WdS(NRqRxRR{R}R�(RqRxRR{R}R�(RR#RXtsetattrR@(R!RBR�RI((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#s	
cGs|jd|_dS(Ni(R(R!targs((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�$scGsZ|jdkrF|jj}|jj|�|j|_|j|_n|jd|_dS(Nii(RRRXRbRRmRRo(R!RR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRn's((R=R>R?R#R�Rn(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s		R�cBs eZdZd�Zd�ZRS(cGsB|jj}|j|�|jj|k	r>|jd|_ndS(Ni(RRgRR(R!RR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�4s
cGs`|jdkr?|j|jj_|j|jj_d|_n|jd|_|j|�dS(Nii(RRRRXRmRRoR@(R!R((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRn:s((R=R>R?R�Rn(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�1s	s8http://xml.python.org/entities/fragment-builder/internals�<!DOCTYPE wrapper
  %%s [
  <!ENTITY fragment-builder-internal
    SYSTEM "%s">
%%s
]>
<wrapper %%s
>&fragment-builder-internal;</wrapper>tFragmentBuildercBsPeZdZdd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
RS(	s�Builder which constructs document fragments given XML source
    text and a context node.

    The context node is expected to provide information about the
    namespace declarations which are in scope at the start of the
    fragment.
    cCsM|jtkr$||_||_n|j|_||_tj||�dS(N(R�R�toriginalDocumentR�R�RQR#(R!R�RZ((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#bs		cCstj|�d|_dS(N(RQRYR@tfragment(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRYks
cCs|j|j��S(sRParse a document fragment from a file object, returning the
        fragment node.(R�R�(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�osc	Cs�||_|j�}|jj}d}|r�|jp?|j�}|jrdd|j|jf}q�|jr�d|j}q�nd}|j�}t	|||f}y|j
|d�Wn|j��nX|j}|j�|S(sMParse a document fragment from a string, returning the
        fragment node.R�sPUBLIC "%s" "%s"sSYSTEM "%s"i(
t_sourceRcR
R�R�t_getDeclarationsR�R�t_getNSattrst_FRAGMENT_BUILDER_TEMPLATER�RYR(	R!R�R�R�tidentR�tnsattrsRfR((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�ts,			
	
cCs�|jjj}d}|r�x�t|jj�D]v}|jj|�}|rY|d}nd||jf}|jr�d||j|j	f}q.d||j	f}q.Wx�t|j
j�D]�}|j
j|�}|r�|d}nd||jf}|jrd||j|j	f}n5|j	r=d||j	f}nd	||jjf}|j
rrd
||j
f}n|d}q�Wn|S(s�Re-create the internal subset from the DocumentType node.

        This is only needed if we don't already have the
        internalSubset as a string.
        R�s
  s%s<!NOTATION %ss!%s PUBLIC "%s"
             "%s">s%s SYSTEM "%s">s
%s<!ENTITY %ss %s PUBLIC "%s"
             "%s"s%s SYSTEM "%s"s%s "%s"s%s NOTATION %st>(R�R�R�R�R�tlengthtitemtnodeNameR�R�Rt
firstChildR�R�(R!R�RCR�tnotationR((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR
�s6
	
			cCsdS(NR�((R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�scCs�|tkr�|j}|j}|jj|�}|j|_|jj�|_|j|_z|j|j	d�Wd||_||_d|_	XdStj|||||�SdS(Nii����(
t$_FRAGMENT_BUILDER_INTERNAL_SYSTEM_IDRfRgRXtExternalEntityParserCreateR
tcreateDocumentFragmentRR�RR@RQR�(R!R�R�R�R�told_documenttold_cur_nodeR�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s				
N(R=R>R�R@R#RYR�R�R
RR�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR	Ys					$	t
NamespacescBsDeZdZd�Zd�Zd�Zd�Zd�Zd�ZRS(s7Mix-in class for builders; adds support for namespaces.cCs
g|_dS(N(t_ns_ordered_prefixes(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt_initNamespaces�scCstjdd�}t|_|S(s'Create a new namespace-handling parser.tnamespace_separatorRE(RR[R^tnamespace_prefixes(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR\�s	cCs/tj||�|jjr+|j|_ndS(s.Insert the namespace-handlers onto the parser.N(RQRbRStnamespace_declarationststart_namespace_decl_handlertStartNamespaceDeclHandler(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRb�scCs|jj||f�dS(s/Push this namespace declaration on our storage.N(RR�(R!RNRL((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR#�scCs�d|kr*t||�\}}}}nt}|}d}t}tj||||�}|j|_t|j	|�||_	|j
rIx�|j
D]�\}}|r�tjt|d|�t
|d�}ntjdt
dt�}|jdj}	||	d<|	d<|j}	||	d<|	d<|j|	d<t||�q�W|j
2n|r�|j}
|j}xtdt|�d	�D]}||}
||d
}d|
kr�t||
�\}}}}tj||||�}||
|<||||f<n2tj|
t|
t�}||
|
<||t|
f<|jdj}	||	d<|	d<|j}	|j|	d<||	d<|	d<||	d<qzWndS(NREsxmlns:txmlnsiR�R�R�R�iitownerElement(RPRR@RRtElementRfR�RRgRR�RDRR�R�Rt_attrst_attrsNSR�RH(R!RIR�RLRMRNROR�R�R�R(R)R�R*R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sZ			

		


	
cCs�|j}d|krlt||�\}}}}|j|kr]|j|kr]|j|ks�td��n6|j|ks�td��|jtks�td��|j|_|j	|�dS(NREs$element stack messed up! (namespace)s&element stack messed up - bad nodeNames*element stack messed up - bad namespaceURI(
RgRPR.R/RNRFRRR�R�(R!RIRgRLRMRNRO((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRn!s			(	R=R>R�RR\RbR#R�Rn(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�s					:tExpatBuilderNScBseZdZd�ZRS(s*Document builder that supports namespaces.cCstj|�|j�dS(N(RQRYR(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRY5s
(R=R>R�RY(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR*2stFragmentBuilderNScBs eZdZd�Zd�ZRS(s*Fragment builder that supports namespaces.cCstj|�|j�dS(N(R	RYR(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRY=s
cCs�d}|j}g}x�|r�t|d�r�x�|jj�D]p\}}||kr[q=n|j|�|r{d|}nd}|r�d|||f}q=d||f}q=Wn|j}qW|S(sNReturn string of namespace attributes from this element and
        ancestors.R�t_ns_prefix_urisxmlns:R%s%s
    %s='%s's %s='%s'(R�thasattrR,titemsR�R�(R!tattrsR�R�RNRLtdeclname((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRAs"		


(R=R>R�RYR(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR+:s	R�cBseZdZRS(sEException raised to short-circuit parsing in InternalSubsetExtractor.(R=R>R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�_sR�cBsSeZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d�ZRS(	sBXML processor which can rip out the internal document type subset.cCs|jS(s'Return the internal subset as a string.(R�(R!((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�hscCs,ytj||�Wntk
r'nXdS(N(RQR�R�(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�ls
cCs,ytj||�Wntk
r'nXdS(N(RQR�R�(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�rs
cCs|j|_|j|_dS(N(RjRkR�Rm(R!R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRbxscCsF|r9|j�}g|_|jj|_|j|_n	t��dS(N(RcR�R�tDefaultHandlerR�R�R�(R!RIR�R�R�R�((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyRj|s	cCs@dj|j�jdd�jdd�}||_t��dS(NR�s
s
s
(tjoinR�treplaceR�(R!RC((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s*	cCs
t��dS(N(R�(R!RIR/((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��sN(R=R>R�R@R�R�R�R�RbRjR�R�(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR�cs					
	cCsp|rt�}n	t�}t|t�r]t|d�}z|j|�}Wd|j�Xn|j|�}|S(s{Parse a document, returning the resulting Document node.

    'file' may be either a file name or an open file object.
    trbN(R*RQt
isinstancetStringTypestopenR�tclose(R�t
namespacesRBtfptresult((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytparse�s	cCs(|rt�}n	t�}|j|�S(sOParse a document from a string, returning the resulting
    Document node.
    (R*RQR�(R�R9RB((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyR��s	cCsv|rt|�}nt|�}t|t�rct|d�}z|j|�}Wd|j�Xn|j|�}|S(s�Parse a fragment of a document, given the context from which it
    was originally extracted.  context should be the parent of the
    node(s) which are in the fragment.

    'file' may be either a file name or an open file object.
    R4N(R+R	R5R6R7R�R8(R�R�R9RBR:R;((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt
parseFragment�scCs.|rt|�}nt|�}|j|�S(s�Parse a fragment of a document from a string, given the context
    from which it was originally extracted.  context should be the
    parent of the node(s) which are in the fragment.
    (R+R	R�(R�R�R9RB((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytparseFragmentString�scCs!|jrt|�St|�SdS(s,Create a builder based on an Options object.N(R9R*RQ(RZ((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pytmakeBuilder�s	
N(6R�txml.domRRRRRRtxml.parsersRtxml.dom.minidomRRtxml.dom.NodeFilterR	txml.dom.minicompatR�R�R�tDOMBuilderFilterR�R�R�R�tgetDOMImplementationRdtTypeInfoR@R(tobjectRRDRPRQR�RURR�R�RRR	RR*R+t	ExceptionR�R�R^R<R�R=R>R?(((s,/usr/lib64/python2.7/xml/dom/expatbuilder.pyt<module>s`
			3		�I:ud%,

Zerion Mini Shell 1.0