Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
site-packages
/
lxml
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/site-packages/lxml/ElementInclude.pyo
mō ÔZīGc @ sŲ d Z d k Z d k Z d k l Z d k l Z y e Wn e j o d k l Z n Xd Z e d Z e d Z d e i f d YZ d d Z d d d Z d Z d d d Z d d d d Z d S( 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. N( s urljoin( s urlopen( s Sets! {http://www.w3.org/2001/XInclude}t includet fallbackt FatalIncludeErrorc B s t Z RS( N( t __name__t __module__( ( ( t7 /usr/lib/python2.4/site-packages/lxml/ElementInclude.pyR F s c C sf t | } | d j o t i | i } n' | i } | o | i | } n | i | S( Nt xml( t opent hreft filet parset etreet getroott datat readt encodingt decodet close( R R R R R ( ( R t default_loaderV s c C s | d j o t i | | i } nZ d | j o t | } n t | } | i } | i | o | i | } n | S( NR s ://( R R R t parserR R t urlopent fR R R R R ( R R R R R R ( ( R t _lxml_default_loadere s c s d d d } | S( Nc s | | | S( N( t loaderR R R ( R R R R ( R ( R t loadw s ( t NoneR ( R R ( ( R R t _wrap_et_loaderv s c C s | d j oV t | d o | } | i } n | i } t | d o | i i } q n! t | d o | i } n t | | d | d S( NR t docinfot base_url( R R t hasattrt elemt treeR t getroottreeR t URLt _includeR ( R R R R ( ( R R s c C sâ | d j o t | } n t } | d j o t } n | i i } t | i d } xz| D]r} | i t j oõt | | i d } | i d d } | i } | d j oÍ | | j o t d | n | i | | | | d | } | d j o t d | | f n t | | | } | i o | i p d | i | _ n | d j o | Sn | i | | qÚ| d j oÄ | | | d | i d } | d j o t d | | f n | i } | d j o | i p d | | _ n; | d j o | Sn&