Ñò ŸªJc@s&dZddklZddkZy$ddklZddklZWn3ej o'ddk lZddk lZnXye Wn#e j oddk lZ nXdZedZed Zd eifd „ƒ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.6/site-packages/lxml/ElementInclude.pyRMscCsot|dƒ}|djoti|ƒiƒ}n-|iƒ}|p d}n|i|ƒ}|iƒ|S(Ntrbtxmlsutf-8(topenRtparsetgetroottreadtdecodetclose(threfR tencodingtfiletdata((s9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pytdefault_loader]s    cCs|djoti||ƒiƒ}ncd|jot|ƒ}nt|dƒ}|iƒ}|iƒ|p d}n|i|ƒ}|S(NR s://R sutf-8(RR R RR RRR(RR RtparserRtf((s9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pyt_lxml_default_loaderms     csdd‡fd†}|S(Ncsˆ|||ƒS(N((RR RR(tloader(s9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pytload€s(tNone(RR((Rs9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pyt_wrap_et_loaderscCsš|djoVt|dƒo|}|iƒ}n |iƒ}t|dƒo|ii}qƒn!t|dƒo|iƒ}nt||d|ƒdS(NR tdocinfotbase_url(RthasattrR t getroottreeRtURLt_include(telemRRttree((s9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pyR‘s  cCsÜ|dj ot|ƒ}nt}|djo tƒ}n|iƒi}t|idƒƒ}xt|D]l}|it joït ||i dƒƒ}|i ddƒ} |i ƒ} | djoÊ||jot d|ƒ‚n|i|ƒ||| d|ƒ} | djot d|| fƒ‚nt| ||ƒ} |io| ipd|i| _n| djo| S| i|| ƒqÔ| d joÁ||| d |i d ƒƒ} | djot d|| fƒ‚n|iƒ} | dj o| ipd| | _n8| djo| S| ipd| |ipd| _| i|ƒqÔt d | ƒ‚qh|itjoD|i ƒ} | dj o'| it jot d |iƒ‚qÔqht d |iƒ‚qhW|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"ttailtreplacet getpreviousR&tremovetXINCLUDE_FALLBACK(R#Rt _parent_hrefsRt load_includeRtinclude_elementsteRR tparenttnodeR&t predecessor((s9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pyR"žsf               % (t__doc__tlxmlRtcopyturlparseRturllib2Rt ImportErrort urllib.parseturllib.requestR't NameErrortsetsRtXINCLUDER+R3tLxmlSyntaxErrorRRRRRRR"(((s9/usr/lib64/python2.6/site-packages/lxml/ElementInclude.pyt3s*