509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
wWS`c           @   sü  d  Z  d d l m Z m Z m Z d d l m Z m Z m Z d d l m	 Z	 d d l
 m Z m Z d d l m Z d d l Te j Z e j Z e j Z e j j Z e j j Z e j j Z e j j Z e j ƒ  Z i	 e j e d ƒ d	 6e j e d
 ƒ d 6e j e d ƒ d 6e j e d ƒ d 6e j e d ƒ d 6e j e d ƒ d 6e j e d ƒ d 6e j e d ƒ d 6e j e d ƒ d 6Z d e f d „  ƒ  YZ d „  Z d „  Z  d f  d „  ƒ  YZ! e e e f Z" d  e f d! „  ƒ  YZ# d" e f d# „  ƒ  YZ$ d$ e$ f d% „  ƒ  YZ% d& e$ f d' „  ƒ  YZ& d( Z' d) e' Z( d* e! f d+ „  ƒ  YZ) d, f  d- „  ƒ  YZ* d. e* e! f d/ „  ƒ  YZ+ d0 e* e) f d1 „  ƒ  YZ, d2 e- f d3 „  ƒ  YZ. d4 e! f d5 „  ƒ  YZ/ e0 d6 „ Z1 e0 d7 „ Z2 e0 d8 „ Z3 e0 d9 „ Z4 d: „  Z5 d; 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
   xmlbuildert   minidomt   Node(   t   EMPTY_NAMESPACEt   EMPTY_PREFIXt   XMLNS_NAMESPACE(   t   expat(   t   _append_childt   _set_attribute_node(   t
   NodeFilter(   t   *t   cdatat   CDATAt   enumerationt   ENUMt   entityt   ENTITYt   entitiest   ENTITIESt   idt   IDt   idreft   IDREFt   idrefst   IDREFSt   nmtokent   NMTOKENt   nmtokenst   NMTOKENSt   ElementInfoc           B   sb   e  Z d Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d	 „  Z
 d
 „  Z d „  Z RS(   t
   _attr_infot   _modelt   tagNamec         C   s   | |  _  g  |  _ | |  _ d  S(   N(   R    R   R   (   t   selfR    t   model(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   __init__A   s    		c         C   s   |  j  |  j |  j f S(   N(   R   R   R    (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   __getstate__F   s    c         C   s   | \ |  _  |  _ |  _ d  S(   N(   R   R   R    (   R!   t   state(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   __setstate__I   s    c         C   s\   xR |  j  D]G } | d | k r
 | d } | d d k rB t d St | d Sq
 q
 Wt j S(   Ni   iþÿÿÿi    t   (R   (   R   t   _typeinfo_mapR   t   _no_type(   R!   t   anamet   infot   t(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   getAttributeTypeL   s    
c         C   s   t  j S(   N(   R   R)   (   R!   t   namespaceURIt	   localName(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   getAttributeTypeNSV   s    c         C   s:   |  j  r2 |  j  d } | t j j t j j f k St Sd  S(   Ni    (   R   R   R"   t   XML_CTYPE_ANYt   XML_CTYPE_MIXEDt   False(   R!   t   type(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   isElementContentY   s
    	c         C   s(   |  j  r  |  j  d t j j k St Sd  S(   Ni    (   R   R   R"   t   XML_CTYPE_EMPTYR3   (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   isEmptya   s    	c         C   s6   x/ |  j  D]$ } | d | k r
 | d d k Sq
 Wt S(   Ni   iþÿÿÿR   (   R   R3   (   R!   R*   R+   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   isIdg   s    c         C   s   |  j  | | f ƒ S(   N(   R8   (   R!   t   eurit   enamet   auriR*   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   isIdNSm   s    (   R   R   R    N(   t   __name__t
   __module__t	   __slots__t   NoneR#   R$   R&   R-   R0   R5   R7   R8   R<   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR   >   s   			
				c         C   s   |  j  | | ƒ S(   N(   t   _intern_setdefault(   t   buildert   s(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   _internq   s    c         C   sÉ   d | k s t  ‚ | j d ƒ } |  j } t | ƒ d k r‹ | \ } } } | | | ƒ } d | | f } | | | ƒ } | | | ƒ } n% | \ } } t } | | | ƒ } } | | | ƒ | | | f S(   Nt    i   s   %s:%s(   t   AssertionErrort   splitRA   t   lenR   (   RB   t   namet   partst   internt   urit	   localnamet   prefixt   qname(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   _parse_ns_namet   s    	t   ExpatBuilderc           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(   sP   Document builder that uses Expat to build a ParsedXML.DOM document
    instance.c         C   sw   | d  k r t j ƒ  } n  | |  _ |  j j d  k	 rN t |  j j ƒ |  _ n d  |  _ t |  _ d  |  _	 |  j
 ƒ  d  S(   N(   R@   R    t   Optionst   _optionst   filtert   FilterVisibilityControllert   _filterR   t   _finish_start_elementt   _parsert   reset(   R!   t   options(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR#   ‰   s    				c         C   s
   t  j ƒ  S(   s   Create a new parser object.(   R   t   ParserCreate(   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   createParser—   s    c         C   sh   |  j  sa |  j ƒ  |  _  |  j  j j |  _ t |  j  _ t |  j  _ t |  j  _ |  j	 |  j  ƒ n  |  j  S(   s7   Return the parser object, creating a new one if needed.(
   RX   R\   RK   t
   setdefaultRA   t   Truet   buffer_textt   ordered_attributest   specified_attributest   install(   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt	   getParser›   s    	c         C   s@   t  j t d d ƒ |  _ |  j |  _ |  j j |  _ t |  _ d S(   s6   Free all data structures used during DOM construction.N(	   t   theDOMImplementationt   createDocumentR   R@   t   documentt   curNodet
   _elem_infoR3   t   _cdata(   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRY   ¦   s
    c         C   så   |  j  | _ |  j | _ |  j | _ |  j | _ |  j j	 rK |  j
 | _ n  |  j | _ |  j j rr |  j | _ n  |  j j r¥ |  j | _ |  j | _ |  j | _ n |  j | _ |  j | _ |  j | _ |  j | _ |  j | _  d S(   s>   Install the callbacks needed to build the DOM into the parser.N(!   t   start_doctype_decl_handlert   StartDoctypeDeclHandlert   first_element_handlert   StartElementHandlert   end_element_handlert   EndElementHandlert
   pi_handlert   ProcessingInstructionHandlerRS   R   t   entity_decl_handlert   EntityDeclHandlert   notation_decl_handlert   NotationDeclHandlert   commentst   comment_handlert   CommentHandlert   cdata_sectionst   start_cdata_section_handlert   StartCdataSectionHandlert   end_cdata_section_handlert   EndCdataSectionHandlert   character_data_handler_cdatat   CharacterDataHandlert   character_data_handlert   external_entity_ref_handlert   ExternalEntityRefHandlert   xml_decl_handlert   XmlDeclHandlert   element_decl_handlert   ElementDeclHandlert   attlist_decl_handlert   AttlistDeclHandler(   R!   t   parser(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRb   ®   s$    c         C   s²   |  j  ƒ  } t } yl xU | j d ƒ } | s1 Pn  | j | d ƒ | rc |  j j rc |  j | ƒ n  t } q W| j d t ƒ Wn t k
 r‘ n X|  j } |  j	 ƒ  d |  _ | S(   sI   Parse a document from a file object, returning the document
        node.i   i   i    t    i @  N(   Rc   R^   t   readt   ParseRf   t   documentElementt   _setup_subsetR3   t   ParseEscapeRY   R@   RX   (   R!   t   fileR‰   t   first_buffert   buffert   doc(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt	   parseFileÅ   s$    
	
	c         C   sa   |  j  ƒ  } y! | j | t ƒ |  j | ƒ Wn t k
 r@ n X|  j } |  j ƒ  d |  _ | S(   s<   Parse a document from a string, returning the document node.N(	   Rc   RŒ   R^   RŽ   R�   Rf   RY   R@   RX   (   R!   t   stringR‰   R“   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   parseStringÛ   s    	
	c         C   sD   |  j  j r@ t ƒ  } | j | ƒ | j ƒ  } | |  j  j _ n  d S(   s/   Load the internal subset if there might be one.N(   Rf   t   doctypet   InternalSubsetExtractorR–   t	   getSubsett   internalSubset(   R!   R’   t	   extractort   subset(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRŽ   è   s
    	c         C   sù   |  j  j j | | | ƒ } |  j  | _ t |  j  | ƒ | |  j  _ |  j rž |  j j | ƒ t k rž d  |  j  _ |  j  j
 d =d  } d  |  j _ d  |  j _ n  | rõ | d  k	 rË g  | j _ g  | j _ n  d  |  j _ d  |  j _ |  j |  j _ n  d  S(   Niÿÿÿÿ(   Rf   t   implementationt   createDocumentTypet   ownerDocumentR   R—   RV   t
   acceptNodet   FILTER_REJECTR@   t
   childNodesRX   Rs   Ru   R   t   _seqt	   notationsRx   Rq   t   end_doctype_decl_handlert   EndDoctypeDeclHandler(   R!   t   doctypeNamet   systemIdt   publicIdt   has_internal_subsetR—   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRj   ð   s$    !c         C   sO   |  j  j r |  j |  j _ n  |  j |  j _ |  j p< |  j sK t	 |  _
 n  d  S(   N(   RS   Rv   Rw   RX   Rx   Rp   Rq   Rh   RV   R   t   _finish_end_element(   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR¥     s
    c         C   s]   |  j  j | | ƒ } t |  j | ƒ |  j rY |  j j | ƒ t k rY |  j j | ƒ n  d  S(   N(   Rf   t   createProcessingInstructionR   Rg   RV   R    R¡   t   removeChild(   R!   t   targett   datat   node(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRp     s    !c         C   sû   |  j  j } |  j rd |  j rF | d j t k rF | d j | ƒ d  S|  j j | ƒ } t	 |  _ nƒ | r³ | d j t
 k r³ | d } | j | } | j } | | d <| d <d  St j ƒ  } | j } | | d <| d <|  j | d <t |  j  | ƒ d  S(   NiÿÿÿÿR¯   t	   nodeValueRŸ   (   Rg   R¢   Ri   t   _cdata_continuet   nodeTypet   CDATA_SECTION_NODEt
   appendDataRf   t   createCDATASectionR^   t	   TEXT_NODER¯   t   __dict__R   t   TextR   (   R!   R¯   R¢   R°   t   valuet   d(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR~     s&    		
		c         C   s¤   |  j  j } | rU | d j t k rU | d } | j } | j | | d <| d <d  St j ƒ  } | j } | j | | d <| d <|  j | d <t	 |  j  | ƒ d  S(   NiÿÿÿÿR¯   R±   RŸ   (
   Rg   R¢   R³   R·   R¸   R¯   R   R¹   Rf   R   (   R!   R¯   R¢   R°   R»   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR€   (  s    
		c   
      C   sº   | r
 d  S|  j  j s d  S|  j j | | | | ƒ } | d  k	 rf |  j j | ƒ }	 | j j |	 ƒ n  |  j j j j	 j | ƒ |  j
 r¶ |  j
 j | ƒ t k r¶ |  j j j j	 d =n  d  S(   Niÿÿÿÿ(   RS   R   Rf   t   _create_entityR@   t   createTextNodeR¢   t   appendR—   R£   RV   R    R¡   (
   R!   t
   entityNamet   is_parameter_entityRº   t   baseR¨   R©   t   notationNameR°   t   child(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRr   5  s    !c         C   sl   |  j  j | | | ƒ } |  j  j j j j | ƒ |  j rh |  j j | ƒ t k rh |  j  j j j d =n  d  S(   Niÿÿÿÿ(	   Rf   t   _create_notationR—   R¤   R£   R¾   RV   R    t   FILTER_ACCEPT(   R!   RÂ   RÁ   R¨   R©   R°   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRt   G  s    !c         C   sZ   |  j  j | ƒ } t |  j | ƒ |  j rV |  j j | ƒ t k rV |  j j | ƒ n  d  S(   N(   Rf   t   createCommentR   Rg   RV   R    R¡   R­   (   R!   R¯   R°   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRw   M  s    !c         C   s   t  |  _ t |  _ d  S(   N(   R^   Ri   R3   R²   (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRz   S  s    	c         C   s   t  |  _ t  |  _ d  S(   N(   R3   Ri   R²   (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR|   W  s    	c         C   s   d S(   Ni   (    (   R!   t   contextRÁ   R¨   R©   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR�   [  s    c         C   sK   |  j  d  k r% |  j r% t |  _ n  |  j |  j ƒ  _ |  j | | ƒ d  S(   N(   RV   R@   Rh   R   R«   t   start_element_handlerRc   Rm   (   R!   RI   t
   attributes(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRl   ^  s    c         C   sþ   |  j  j | ƒ } t |  j | ƒ | |  _ | rØ x¤ t d t | ƒ d ƒ D]‡ } t j | | t d  t
 ƒ } | | d } | j d j } | | d <| d <| j } | | d <| d <|  j  | d <t | | ƒ qJ Wn  | |  j  j k	 rú |  j | ƒ n  d  S(   Ni    i   i   R¯   R±   Rº   RŸ   (   Rf   t   createElementR   Rg   t   rangeRH   R   t   AttrR   R@   R   R¢   R¸   R   R�   RW   (   R!   RI   RÉ   R°   t   it   aRº   R»   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÈ   d  s     		c         C   s”   |  j  r� | |  j j k r d  S|  j  j | ƒ } | t k rJ t |  ƒ n | t k rc t |  ƒ n d  S| j |  _	 | j j
 | ƒ | j ƒ  n  d  S(   N(   RV   Rf   R�   t   startContainerR¡   t   Rejectert   FILTER_SKIPt   Skippert
   parentNodeRg   R­   t   unlink(   R!   R°   t   filt(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRW   x  s    	c         C   s&   |  j  } | j |  _  |  j | ƒ d  S(   N(   Rg   RÓ   R«   (   R!   RI   Rg   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRn   �  s    	c         C   s‰   |  j  j | j ƒ } | r. |  j | | ƒ n  |  j r… | |  j j k rM d  S|  j j | ƒ t k r… |  j	 j
 | ƒ | j ƒ  q… n  d  S(   N(   Rh   t   getR    t   _handle_white_text_nodesRV   Rf   R�   R    R¡   Rg   R­   RÔ   (   R!   Rg   R+   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR«   ”  s    	c         C   sˆ   |  j  j s | j ƒ  r d  Sg  } x@ | j D]5 } | j t k r- | j j ƒ  r- | j | ƒ q- q- Wx | D] } | j	 | ƒ qm Wd  S(   N(
   RS   t   whitespace_in_element_contentR5   R¢   R³   R·   R¯   t   stripR¾   R­   (   R!   R°   R+   t   LRÃ   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR×   Ÿ  s    c         C   sY   |  j  j | ƒ } | d  k r7 t | | ƒ |  j  | <n | j d  k sL t ‚ | | _ d  S(   N(   Rh   RÖ   R@   R   R   RF   (   R!   RI   R"   R+   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR…   °  s
    c      	   C   sf   |  j  j | ƒ } | d  k r: t | ƒ } | |  j  | <n  | j j d  | d  d  | d | | g ƒ d  S(   Ni    (   Rh   RÖ   R@   R   R   R¾   (   R!   t   elemRI   R4   t   defaultt   requiredR+   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR‡   ¸  s    	c         C   sL   | |  j  _ | |  j  _ | d k rH | r9 t |  j  _ qH t |  j  _ n  d  S(   Ni    (   Rf   t   versiont   encodingR^   t
   standaloneR3   (   R!   RÞ   Rß   Rà   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRƒ   À  s    N(    R=   R>   t   __doc__R@   R#   R\   Rc   RY   Rb   R”   R–   RŽ   Rj   R¥   Rp   R~   R€   Rr   Rt   Rw   Rz   R|   R�   Rl   RÈ   RW   Rn   R«   R×   R…   R‡   Rƒ   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRQ   …   s:   																										RU   c           B   sÑ   e  Z d  Z d Z d „  Z d „  Z d „  Z i e j e	 j
 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j 6e j e	 j  6Z! RS(   so   Wrapper around a DOMBuilderFilter which implements the checks
    to make the whatToShow filter attribute work.RT   c         C   s   | |  _  d  S(   N(   RT   (   R!   RT   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR#   Õ  s    c         C   su   |  j  | j } |  j j | @rm |  j j | ƒ } | t k rG t ‚ n  | t k ri t d t	 | ƒ ‚ n  | St
 Sd  S(   Ns)   startContainer() returned illegal value: (   t   _nodetype_maskR³   RT   t
   whatToShowRÏ   t   FILTER_INTERRUPTR�   t   _ALLOWED_FILTER_RETURNSt
   ValueErrort   reprRÅ   (   R!   R°   t   maskt   val(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÏ   Ø  s    	c         C   s°   |  j  | j } |  j j | @r¨ |  j j | ƒ } | t k rG t ‚ n  | t k r‚ | j } x | j	 D] } | j
 | ƒ qg Wt S| t k r¤ t d t | ƒ ‚ n  | St Sd  S(   Ns%   acceptNode() returned illegal value: (   Râ   R³   RT   Rã   R    Rä   R�   RÑ   RÓ   R¢   t   appendChildR¡   Rå   Ræ   Rç   RÅ   (   R!   R°   Rè   Ré   t   parentRÃ   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR    å  s    		(   RT   ("   R=   R>   Rá   R?   R#   RÏ   R    R	   t   SHOW_ELEMENTR   t   ELEMENT_NODEt   SHOW_ATTRIBUTEt   ATTRIBUTE_NODEt	   SHOW_TEXTR·   t   SHOW_CDATA_SECTIONR´   t   SHOW_ENTITY_REFERENCEt   ENTITY_REFERENCE_NODEt   SHOW_ENTITYt   ENTITY_NODEt   SHOW_PROCESSING_INSTRUCTIONt   PROCESSING_INSTRUCTION_NODEt   SHOW_COMMENTt   COMMENT_NODEt   SHOW_DOCUMENTt   DOCUMENT_NODEt   SHOW_DOCUMENT_TYPEt   DOCUMENT_TYPE_NODEt   SHOW_DOCUMENT_FRAGMENTt   DOCUMENT_FRAGMENT_NODEt   SHOW_NOTATIONt   NOTATION_NODERâ   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRU   Ï  s$   			t   FilterCrutchc           B   s   e  Z d Z d „  Z RS(   t   _buildert   _levelt
   _old_startt   _old_endc         C   sO   d |  _  | |  _ | j } | j |  _ | j |  _ |  j | _ |  j | _ d  S(   Ni    (	   R  R  RX   Rm   R  Ro   R  RÈ   Rn   (   R!   RB   R‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR#     s    			(   R  R  R  R  (   R=   R>   R?   R#   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR  	  s   RÐ   c           B   s)   e  Z d Z d  „  Z d „  Z d „  Z RS(   c         C   s>   t  j |  | ƒ | j } x d D] } t | | d  ƒ q  Wd  S(   NRq   Rx   R   R{   R}   R‚   (   Rq   Rx   R   R{   R}   R‚   (   R  R#   RX   t   setattrR@   (   R!   RB   R‰   RI   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR#     s    	    
c         G   s   |  j  d |  _  d  S(   Ni   (   R  (   R!   t   args(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÈ   $  s    c         G   sZ   |  j  d k rF |  j j } |  j j | ƒ |  j | _ |  j | _ n |  j  d |  _  d  S(   Ni    i   (   R  R  RX   Rb   R  Rm   R  Ro   (   R!   R  R‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRn   '  s    (    (   R=   R>   R?   R#   RÈ   Rn   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÐ     s   		RÒ   c           B   s    e  Z d Z d  „  Z d „  Z RS(   c         G   sB   |  j  j } |  j | Œ  |  j  j | k	 r> |  j d |  _ n  d  S(   Ni   (   R  Rg   R  R  (   R!   R  R°   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÈ   4  s    c         G   s`   |  j  d k r? |  j |  j j _ |  j |  j j _ d  |  _ n |  j  d |  _  |  j | Œ  d  S(   Ni    i   (   R  R  R  RX   Rm   R  Ro   R@   (   R!   R  (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRn   :  s    (    (   R=   R>   R?   RÈ   Rn   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÒ   1  s   	s8   http://xml.python.org/entities/fragment-builder/internalsŠ   <!DOCTYPE wrapper
  %%s [
  <!ENTITY fragment-builder-internal
    SYSTEM "%s">
%%s
]>
<wrapper %%s
>&fragment-builder-internal;</wrapper>t   FragmentBuilderc           B   sP   e  Z d  Z d d „ Z d „  Z d „  Z d „  Z d „  Z d „  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.
    c         C   sM   | j  t k r$ | |  _ | |  _ n | j |  _ | |  _ t j |  | ƒ d  S(   N(   R³   Rû   t   originalDocumentRÇ   RŸ   RQ   R#   (   R!   RÇ   RZ   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR#   b  s    		c         C   s   t  j |  ƒ d  |  _ d  S(   N(   RQ   RY   R@   t   fragment(   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRY   k  s    c         C   s   |  j  | j ƒ  ƒ S(   sR   Parse a document fragment from a file object, returning the
        fragment node.(   R–   R‹   (   R!   R�   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR”   o  s    c   	      C   sç   | |  _  |  j ƒ  } |  j j } d } | r€ | j p? |  j ƒ  } | j rd d | j | j f } q† | j r† d | j } q† n d } |  j ƒ  } t	 | | | f } y | j
 | d ƒ Wn |  j ƒ  ‚  n X|  j } |  j ƒ  | S(   sM   Parse a document fragment from a string, returning the
        fragment node.RŠ   s   PUBLIC "%s" "%s"s   SYSTEM "%s"i   (   t   _sourceRc   R
  R—   Rš   t   _getDeclarationsR©   R¨   t   _getNSattrst   _FRAGMENT_BUILDER_TEMPLATERŒ   RY   R  (	   R!   R•   R‰   R—   t   identRœ   t   nsattrsRf   R  (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR–   t  s,    			
	
c         C   s‡  |  j  j j } d } | rƒxŠ t | j j ƒ D]v } | j j | ƒ } | rY | d } n  d | | j f } | j r‘ d | | j | j	 f } q. d | | j	 f } q. WxØ t | j
 j ƒ D]Á } | j
 j | ƒ } | ræ | d } n  d | | j f } | j rd | | j | j	 f } n5 | j	 r=d | | j	 f } n d	 | | j j f } | j rrd
 | | 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¤   t   lengtht   itemt   nodeNameR©   R¨   R   t
   firstChildR¯   RÂ   (   R!   R—   RC   RÍ   t   notationR   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR  �  s6    				c         C   s   d S(   NRŠ   (    (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR  ´  s    c         C   s±   | t  k r” |  j } |  j } |  j j | ƒ } |  j |  _ |  j j ƒ  |  _ |  j |  _ z | j |  j	 d ƒ Wd  | |  _ | |  _ d  |  _	 Xd St j |  | | | | ƒ Sd  S(   Ni   iÿÿÿÿ(   t$   _FRAGMENT_BUILDER_INTERNAL_SYSTEM_IDRf   Rg   RX   t   ExternalEntityParserCreateR
  t   createDocumentFragmentR  RŒ   R  R@   RQ   R�   (   R!   RÇ   RÁ   R¨   R©   t   old_documentt   old_cur_nodeR‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR�   ·  s    				
N(   R=   R>   Rá   R@   R#   RY   R”   R–   R  R  R�   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR	  Y  s   					$	t
   Namespacesc           B   sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s7   Mix-in class for builders; adds support for namespaces.c         C   s   g  |  _  d  S(   N(   t   _ns_ordered_prefixes(   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   _initNamespacesÑ  s    c         C   s   t  j d d ƒ } t | _ | S(   s'   Create a new namespace-handling parser.t   namespace_separatorRE   (   R   R[   R^   t   namespace_prefixes(   R!   R‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR\   Ö  s    	c         C   s/   t  j |  | ƒ |  j j r+ |  j | _ n  d S(   s.   Insert the namespace-handlers onto the parser.N(   RQ   Rb   RS   t   namespace_declarationst   start_namespace_decl_handlert   StartNamespaceDeclHandler(   R!   R‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRb   Ü  s    c         C   s   |  j  j | | f ƒ d S(   s/   Push this namespace declaration on our storage.N(   R  R¾   (   R!   RN   RL   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR#  ã  s    c         C   s…  d | k r* t  |  | ƒ \ } } } } n t } | } d  } t } t j | | | | ƒ } |  j | _ t |  j	 | ƒ | |  _	 |  j
 rIx´ |  j
 D]© \ } } | rÌ t j t |  d | ƒ t | d ƒ } n t j d t d t ƒ } | j d j }	 | |	 d <|	 d <| j }	 | |	 d <|	 d <|  j |	 d <t | | ƒ q’ W|  j
 2n  | r�| j }
 | j } xt d t | ƒ d	 ƒ D] } | | } | | d
 } d | k rôt  |  | ƒ \ } } } } t j | | | | ƒ } | |
 | <| | | | f <n2 t j | t | t ƒ } | |
 | <| | t | f <| j d j }	 | |	 d <|	 d <| j }	 |  j |	 d <| |	 d <|	 d <| |	 d <qzWn  d  S(   NRE   s   xmlns:t   xmlnsi    R¯   R±   Rº   RŸ   i   i   t   ownerElement(   RP   R   R@   R   R   t   ElementRf   RŸ   R   Rg   R  RÌ   RD   R   R¢   R¸   R   t   _attrst   _attrsNSRË   RH   (   R!   RI   RÉ   RL   RM   RN   RO   R°   RÎ   R»   R(  R)  RÍ   R*   Rº   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÈ   ç  sZ    			
		


	c         C   s¿   |  j  } d | k rl t |  | ƒ \ } } } } | j | k r] | j | k r] | j | k s¢ t d ƒ ‚ n6 | j | k s‡ t d ƒ ‚ | j t k s¢ t d ƒ ‚ | j |  _  |  j	 | ƒ d  S(   NRE   s$   element stack messed up! (namespace)s&   element stack messed up - bad nodeNames*   element stack messed up - bad namespaceURI(
   Rg   RP   R.   R/   RN   RF   R  R   RÓ   R«   (   R!   RI   Rg   RL   RM   RN   RO   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRn   !  s    			(	   R=   R>   Rá   R  R\   Rb   R#  RÈ   Rn   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR  Î  s   					:t   ExpatBuilderNSc           B   s   e  Z d  Z d „  Z RS(   s*   Document builder that supports namespaces.c         C   s   t  j |  ƒ |  j ƒ  d  S(   N(   RQ   RY   R  (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRY   5  s    (   R=   R>   Rá   RY   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR*  2  s   t   FragmentBuilderNSc           B   s    e  Z d  Z d „  Z d „  Z RS(   s*   Fragment builder that supports namespaces.c         C   s   t  j |  ƒ |  j ƒ  d  S(   N(   R	  RY   R  (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRY   =  s    c         C   sÅ   d } |  j  } g  } x© | rÀ t | d ƒ r´ x„ | j j ƒ  D]p \ } } | | k r[ q= n  | j | ƒ | r{ d | } n d } | r� d | | | f } q= d | | f } q= Wn  | j } q W| S(   sN   Return string of namespace attributes from this element and
        ancestors.RŠ   t   _ns_prefix_uris   xmlns:R%  s   %s
    %s='%s's    %s='%s'(   RÇ   t   hasattrR,  t   itemsR¾   RÓ   (   R!   t   attrsRÇ   RÚ   RN   RL   t   declname(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR  A  s"    		(   R=   R>   Rá   RY   R  (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR+  :  s   	R�   c           B   s   e  Z d  Z RS(   sE   Exception raised to short-circuit parsing in InternalSubsetExtractor.(   R=   R>   Rá   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR�   _  s   R˜   c           B   sS   e  Z d  Z d Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z RS(	   sB   XML processor which can rip out the internal document type subset.c         C   s   |  j  S(   s'   Return the internal subset as a string.(   Rœ   (   R!   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR™   h  s    c         C   s,   y t  j |  | ƒ Wn t k
 r' n Xd  S(   N(   RQ   R”   R�   (   R!   R�   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR”   l  s    c         C   s,   y t  j |  | ƒ Wn t k
 r' n Xd  S(   N(   RQ   R–   R�   (   R!   R•   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR–   r  s    c         C   s   |  j  | _ |  j | _ d  S(   N(   Rj   Rk   RÈ   Rm   (   R!   R‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRb   x  s    c         C   sF   | r9 |  j  ƒ  } g  |  _ |  j j | _ |  j | _ n	 t ƒ  ‚ d  S(   N(   Rc   Rœ   R¾   t   DefaultHandlerR¥   R¦   R�   (   R!   RI   R©   R¨   Rª   R‰   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRj   |  s    	c         C   s@   d j  |  j ƒ j d d ƒ j d d ƒ } | |  _ t ƒ  ‚ d  S(   NRŠ   s   
s   
s   (   t   joinRœ   t   replaceR�   (   R!   RC   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR¥   †  s    *	c         C   s   t  ƒ  ‚ d  S(   N(   R�   (   R!   RI   R/  (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyRÈ   ‹  s    N(   R=   R>   Rá   R@   Rœ   R™   R”   R–   Rb   Rj   R¥   RÈ   (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR˜   c  s   					
	c         C   sp   | r t  ƒ  } 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.
    t   rbN(   R*  RQ   t
   isinstancet   StringTypest   openR”   t   close(   R�   t
   namespacesRB   t   fpt   result(    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   parse�  s    	c         C   s(   | r t  ƒ  } n	 t ƒ  } | j |  ƒ S(   sO   Parse a document from a string, returning the resulting
    Document node.
    (   R*  RQ   R–   (   R•   R9  RB   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyR–   ¤  s    	c         C   sv   | r t  | ƒ } n t | ƒ } t |  t ƒ rc t |  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.
    R4  N(   R+  R	  R5  R6  R7  R”   R8  (   R�   RÇ   R9  RB   R:  R;  (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   parseFragment¯  s    c         C   s.   | r t  | ƒ } 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Ç   R9  RB   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   parseFragmentStringÆ  s    c         C   s!   |  j  r t |  ƒ St |  ƒ Sd S(   s,   Create a builder based on an Options object.N(   R9  R*  RQ   (   RZ   (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   makeBuilderÒ  s    	
N(6   Rá   t   xml.domR    R   R   R   R   R   t   xml.parsersR   t   xml.dom.minidomR   R   t   xml.dom.NodeFilterR	   t   xml.dom.minicompatR·   R´   Rû   t   DOMBuilderFilterRÅ   R¡   RÑ   Rä   t   getDOMImplementationRd   t   TypeInfoR@   R(   t   objectR   RD   RP   RQ   Rå   RU   R  RÐ   RÒ   R  R  R	  R  R*  R+  t	   ExceptionR�   R˜   R^   R<  R–   R=  R>  R?  (    (    (    s9   /opt/alt/python27/lib64/python2.7/xml/dom/expatbuilder.pyt   <module>   s`   
			3		ÿ I:ud%,