
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
{fc           @   s-  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z y e j	 e j
 g Z Wn e k
 r› e j	 g Z n Xd „  Z i  d „ Z i  d „ Z i  d „ Z d „  Z d e j f d	 „  ƒ  YZ d
 e j f d „  ƒ  YZ d e j f d „  ƒ  YZ d d „ Z d S(   sn   A library of useful helper classes to the SAX classes, for the
convenience of application and driver writers.
iÿÿÿÿNc         C   s3   x, | j  ƒ  D] \ } } |  j | | ƒ }  q W|  S(   s2   Replace substrings of a string using a dictionary.(   t   itemst   replace(   t   st   dt   keyt   value(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   __dict_replace   s    c         C   sR   |  j  d d ƒ }  |  j  d d ƒ }  |  j  d d ƒ }  | rN t |  | ƒ }  n  |  S(   sü   Escape &, <, and > in a string of data.

    You can escape other strings of data by passing a dictionary as
    the optional entities parameter.  The keys and values must all be
    strings; each key will be replaced with its corresponding value.
    t   &s   &amp;t   >s   &gt;t   <s   &lt;(   R   R   (   t   datat   entities(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   escape   s    	c         C   sL   |  j  d d ƒ }  |  j  d d ƒ }  | r< t |  | ƒ }  n  |  j  d d ƒ S(   s
  Unescape &amp;, &lt;, and &gt; in a string of data.

    You can unescape other strings of data by passing a dictionary as
    the optional entities parameter.  The keys and values must all be
    strings; each key will be replaced with its corresponding value.
    s   &lt;R	   s   &gt;R   s   &amp;R   (   R   R   (   R
   R   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   unescape'   s
    c         C   s‰   | j  ƒ  } | j i d d 6d d 6d d 6ƒ t |  | ƒ }  d |  k r{ d |  k rn d	 |  j d d
 ƒ }  q… d |  }  n
 d	 |  }  |  S(   s“  Escape and quote an attribute value.

    Escape &, <, and > in a string of data, then quote it for use as
    an attribute value.  The " character will be escaped as well, if
    necessary.

    You can escape other strings of data by passing a dictionary as
    the optional entities parameter.  The keys and values must all be
    strings; each key will be replaced with its corresponding value.
    s   &#10;s   
s   &#13;s   s   &#9;s   	t   "t   's   "%s"s   &quot;s   '%s'(   t   copyt   updateR   R   (   R
   R   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt	   quoteattr5   s    "
c         C   sÄ   |  d  k r$ d d  l } | j }  n  t |  t j ƒ rT t j |  ƒ } d „  | _ nT t j ƒ  } d „  | _ |  j	 | _	 y |  j
 | _
 |  j | _ Wn t k
 r§ n Xt | d | d d d d ƒS(	   Niÿÿÿÿc           S   s   d  S(   N(   t   None(    (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   <lambda>V   t    c           S   s   t  S(   N(   t   True(    (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR   [   R   t   encodingt   errorst   xmlcharrefreplacet   newlines   
(   R   t   syst   stdoutt
   isinstancet   iot	   RawIOBaset   BufferedIOBaset   closet   writablet   writet   seekablet   tellt   AttributeErrort   _UnbufferedTextIOWrapper(   t   outR   R   t   buffer(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   _gettextwriterM   s"    R'   c           B   s   e  Z d  „  Z RS(   c         C   s$   t  t |  ƒ j | ƒ |  j ƒ  d  S(   N(   t   superR'   R#   t   flush(   t   selfR   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR#   k   s    (   t   __name__t
   __module__R#   (    (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR'   j   s   t   XMLGeneratorc           B   sƒ   e  Z d d  d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z d
 „  Z d „  Z d „  Z d „  Z RS(   s
   iso-8859-1c         C   si   t  j j |  ƒ t | | ƒ } | j |  _ | j |  _ i  g |  _ |  j d |  _	 g  |  _
 | |  _ d  S(   Niÿÿÿÿ(   t   handlert   ContentHandlert   __init__R*   R#   t   _writeR,   t   _flusht   _ns_contextst   _current_contextt   _undeclared_ns_mapst	   _encoding(   R-   R(   R   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR3   r   s    	c         C   sX   | d rP d | d k r& d | d S|  j  | d } | rP | d | d Sn  | d S(   s7   Builds a qualified name from a (ns_url, localname) pairi    s$   http://www.w3.org/XML/1998/namespaces   xml:i   t   :(   R7   (   R-   t   namet   prefix(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   _qname|   s    
c         C   s   |  j  d |  j ƒ d  S(   Nu$   <?xml version="1.0" encoding="%s"?>
(   R4   R9   (   R-   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   startDocument�   s    	c         C   s   |  j  ƒ  d  S(   N(   R5   (   R-   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   endDocument“   s    c         C   s@   |  j  j |  j j ƒ  ƒ | |  j | <|  j j | | f ƒ d  S(   N(   R6   t   appendR7   R   R8   (   R-   R<   t   uri(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   startPrefixMapping–   s    c         C   s   |  j  d |  _ |  j  d =d  S(   Niÿÿÿÿ(   R6   R7   (   R-   R<   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   endPrefixMapping›   s    c         C   s\   |  j  d | ƒ x7 | j ƒ  D]) \ } } |  j  d | t | ƒ f ƒ q W|  j  d ƒ d  S(   Nu   <u    %s=%su   >(   R4   R    R   (   R-   R;   t   attrsR   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   startElementŸ   s    !c         C   s   |  j  d | ƒ d  S(   Nu   </%s>(   R4   (   R-   R;   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt
   endElement¥   s    c         C   sÂ   |  j  d |  j | ƒ ƒ xH |  j D]= \ } } | rP |  j  d | | f ƒ q$ |  j  d | ƒ q$ Wg  |  _ x@ | j ƒ  D]2 \ } } |  j  d |  j | ƒ t | ƒ f ƒ q{ W|  j  d ƒ d  S(   Nu   <u    xmlns:%s="%s"u    xmlns="%s"u    %s=%su   >(   R4   R=   R8   R    R   (   R-   R;   t   qnameRD   R<   RA   R   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   startElementNS¨   s    	*c         C   s   |  j  d |  j | ƒ ƒ d  S(   Nu   </%s>(   R4   R=   (   R-   R;   RG   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   endElementNS¶   s    c         C   s;   t  | t ƒ s$ t | |  j ƒ } n  |  j t | ƒ ƒ d  S(   N(   R   t   unicodeR9   R4   R   (   R-   t   content(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt
   characters¹   s    c         C   s5   t  | t ƒ s$ t | |  j ƒ } n  |  j | ƒ d  S(   N(   R   RJ   R9   R4   (   R-   RK   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   ignorableWhitespace¾   s    c         C   s   |  j  d | | f ƒ d  S(   Nu	   <?%s %s?>(   R4   (   R-   t   targetR
   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   processingInstructionÃ   s    N(   R.   R/   R   R3   R=   R>   R?   RB   RC   RE   RF   RH   RI   RL   RM   RO   (    (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR0   p   s   
											t   XMLFilterBasec           B   s  e  Z d  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sY  This class is designed to sit between an XMLReader and the
    client application's event handlers.  By default, it does nothing
    but pass requests up to the reader and events on to the handlers
    unmodified, but subclasses can override specific methods to modify
    the event stream or the configuration requests as they pass
    through.c         C   s   t  j j |  ƒ | |  _ d  S(   N(   t	   xmlreadert	   XMLReaderR3   t   _parent(   R-   t   parent(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR3   Ï   s    c         C   s   |  j  j | ƒ d  S(   N(   t   _err_handlert   error(   R-   t	   exception(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRV   Õ   s    c         C   s   |  j  j | ƒ d  S(   N(   RU   t
   fatalError(   R-   RW   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRX   Ø   s    c         C   s   |  j  j | ƒ d  S(   N(   RU   t   warning(   R-   RW   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRY   Û   s    c         C   s   |  j  j | ƒ d  S(   N(   t   _cont_handlert   setDocumentLocator(   R-   t   locator(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR[   à   s    c         C   s   |  j  j ƒ  d  S(   N(   RZ   R>   (   R-   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR>   ã   s    c         C   s   |  j  j ƒ  d  S(   N(   RZ   R?   (   R-   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR?   æ   s    c         C   s   |  j  j | | ƒ d  S(   N(   RZ   RB   (   R-   R<   RA   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRB   é   s    c         C   s   |  j  j | ƒ d  S(   N(   RZ   RC   (   R-   R<   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRC   ì   s    c         C   s   |  j  j | | ƒ d  S(   N(   RZ   RE   (   R-   R;   RD   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRE   ï   s    c         C   s   |  j  j | ƒ d  S(   N(   RZ   RF   (   R-   R;   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRF   ò   s    c         C   s   |  j  j | | | ƒ d  S(   N(   RZ   RH   (   R-   R;   RG   RD   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRH   õ   s    c         C   s   |  j  j | | ƒ d  S(   N(   RZ   RI   (   R-   R;   RG   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRI   ø   s    c         C   s   |  j  j | ƒ d  S(   N(   RZ   RL   (   R-   RK   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRL   û   s    c         C   s   |  j  j | ƒ d  S(   N(   RZ   RM   (   R-   t   chars(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRM   þ   s    c         C   s   |  j  j | | ƒ d  S(   N(   RZ   RO   (   R-   RN   R
   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRO     s    c         C   s   |  j  j | ƒ d  S(   N(   RZ   t   skippedEntity(   R-   R;   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR^     s    c         C   s   |  j  j | | | ƒ d  S(   N(   t   _dtd_handlert   notationDecl(   R-   R;   t   publicIdt   systemId(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyR`   	  s    c         C   s   |  j  j | | | | ƒ d  S(   N(   R_   t   unparsedEntityDecl(   R-   R;   Ra   Rb   t   ndata(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRc     s    c         C   s   |  j  j | | ƒ S(   N(   t   _ent_handlert   resolveEntity(   R-   Ra   Rb   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRf     s    c         C   sT   |  j  j |  ƒ |  j  j |  ƒ |  j  j |  ƒ |  j  j |  ƒ |  j  j | ƒ d  S(   N(   RS   t   setContentHandlert   setErrorHandlert   setEntityResolvert   setDTDHandlert   parse(   R-   t   source(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRk     s
    c         C   s   |  j  j | ƒ d  S(   N(   RS   t	   setLocale(   R-   t   locale(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRm     s    c         C   s   |  j  j | ƒ S(   N(   RS   t
   getFeature(   R-   R;   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRo      s    c         C   s   |  j  j | | ƒ d  S(   N(   RS   t
   setFeature(   R-   R;   t   state(    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRp   #  s    c         C   s   |  j  j | ƒ S(   N(   RS   t   getProperty(   R-   R;   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRr   &  s    c         C   s   |  j  j | | ƒ d  S(   N(   RS   t   setProperty(   R-   R;   R   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRs   )  s    c         C   s   |  j  S(   N(   RS   (   R-   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt	   getParent.  s    c         C   s   | |  _  d  S(   N(   RS   (   R-   RT   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt	   setParent1  s    N(    R.   R/   t   __doc__R   R3   RV   RX   RY   R[   R>   R?   RB   RC   RE   RF   RH   RI   RL   RM   RO   R^   R`   Rc   Rf   Rk   Rm   Ro   Rp   Rr   Rs   Rt   Ru   (    (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyRP   Ç   s:   																										R   c         C   s  t  |  ƒ t k r$ t j |  ƒ }  nS t |  d ƒ rw |  } t j ƒ  }  |  j | ƒ t | d ƒ rw |  j | j ƒ qw n  |  j ƒ  d k ry|  j
 ƒ  } t j j t j j | ƒ ƒ } t j ƒ  } t | t ƒ rt | t ƒ sdy | j | ƒ } Wqt k
 r| j | ƒ } qXqdnH t | t ƒ rdy | j | ƒ } Wqdt k
 r`| j | ƒ } qdXn  t j j | | ƒ } t j j | ƒ } Wn t k
 r¥t } n X| rË|  j | ƒ t | d ƒ } n4 |  j t j | |  j
 ƒ  ƒ ƒ t j |  j
 ƒ  ƒ } |  j | ƒ n  |  S(   s‚   This function takes an InputSource and an optional base URL and
    returns a fully resolved InputSource object ready for reading.t   readR;   t   rbN(   t   typet   _StringTypesRQ   t   InputSourcet   hasattrt   setByteStreamt   setSystemIdR;   t   getByteStreamR   t   getSystemIdt   ost   patht   dirnamet   normpathR   t   getfilesystemencodingR   RJ   t   decodet   UnicodeDecodeErrort   encodet   joint   isfilet   UnicodeErrort   Falset   opent   urlparset   urljoint   urllibt   urlopen(   Rl   t   baset   ft   sysidt   baseheadR   t   sysidfilenameRŠ   (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   prepare_input_source6  sF    
(   Rv   R�   RŽ   R�   t   typesR   R   R1   RQ   t
   StringTypet   UnicodeTypeRz   R&   R   R   R   R   R*   t   TextIOWrapperR'   R2   R0   RR   RP   R—   (    (    (    s(   /usr/lib64/python2.7/xml/sax/saxutils.pyt   <module>   s$   0		Wo