ok

Mini Shell

Direktori : /usr/lib64/python2.7/site-packages/lxml/
Upload File :
Current File : //usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyo

�
�]Nc@s"dZddlmZddlZy$ddlmZddlmZWn1ek
ryddl	mZddl
mZnXyeWn!ek
r�ddl
mZnXdZedZed	Zd
ejfd��YZdd�Zddd
�Zd�Zddd�Zdddd�ZdS(s
Limited XInclude support for the ElementTree package.

While lxml.etree has full support for XInclude (see
`etree.ElementTree.xinclude()`), this module provides a simpler, pure
Python, ElementTree compatible implementation that supports a simple
form of custom URL resolvers.
i����(tetreeN(turljoin(turlopen(tSets!{http://www.w3.org/2001/XInclude}tincludetfallbacktFatalIncludeErrorcBseZRS((t__name__t
__module__(((s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyRMscCskt|d�}|dkr3tj|�j�}n*|j�}|sNd}n|j|�}|j�|S(Ntrbtxmlsutf-8(topenRtparsetgetroottreadtdecodetclose(threfRtencodingtfiletdata((s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pytdefault_loader]s	
cCs�|dkr'tj||�j�}n^d|krBt|�}nt|d�}|j�}|j�|svd}n|j|�}|S(NR
s://R	sutf-8(RRR
RRRRR(RRRtparserRtf((s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyt_lxml_default_loaderms
	csdd�fd�}|S(Ncs�|||�S(N((RRRR(tloader(s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pytload�s(tNone(RR((Rs9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyt_wrap_et_loaderscCs�|dkr]t|d�r0|}|j�}n|j�}t|d�r{|jj}q{nt|d�r{|j�}nt||d|�dS(NR
tdocinfotbase_url(RthasattrR
tgetroottreeRtURLt_include(telemRRttree((s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyR�scCs�|dk	rt|�}nt}|dkr9t�}n|j�j}t|jd��}xW|D]O}|jt	krQt
||jd��}|jdd�}	|j�}
|	dkr{||kr�t
d|��n|j|�|||	d|�}|dkr!t
d||	f��nt|||�}|jrX|jpHd|j|_n|
dkrh|S|
j||�q�|	d	kr>|||	d
|jd
��}|dkr�t
d||	f��n|j�}
|
dk	r�|
jp�d||
_n3|
dkr|S|
jpd||jp'd|
_|
j|�q�t
d|	��qd|jtkr�|j�}
|
dk	r�|
jt	kr�t
d|j��q�qdt
d
|j��qdW|S(Ns"{http://www.w3.org/2001/XInclude}*RRR
s recursive include of %r detectedRscannot load %r as %rtttextRs)unknown parse type in xi:include tag (%r)s0xi:fallback tag must be child of xi:include (%r)s0Invalid element found in XInclude namespace (%r)(RRRtsetR RtlisttiterttagtXINCLUDE_INCLUDERtgett	getparentRtaddR"ttailtreplacetgetpreviousR&tremovetXINCLUDE_FALLBACK(R#Rt
_parent_hrefsRtload_includeRtinclude_elementsteRRtparenttnodeR&tpredecessor((s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyR"�sd

	#(t__doc__tlxmlRtcopyturlparseRturllib2RtImportErrorturllib.parseturllib.requestR't	NameErrortsetsRtXINCLUDER+R3tLxmlSyntaxErrorRRRRRRR"(((s9/usr/lib64/python2.7/site-packages/lxml/ElementInclude.pyt<module>3s*



	

Zerion Mini Shell 1.0