Ñò
—ã=Pc           @   s‰  d  Z  d d k l Z d d k Td d k Td d k Td d k Td d k l Z l	 Z	 d d k
 l Z d d k l Z d d k l Z e e ƒ Z d d8 d	 „  ƒ  YZ d
 d9 d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d  e f d! „  ƒ  YZ  d" e f d# „  ƒ  YZ! d$ e f d% „  ƒ  YZ" d& e f d' „  ƒ  YZ# d( e f d) „  ƒ  YZ$ d* e f d+ „  ƒ  YZ% d, e f d- „  ƒ  YZ& d. e f d/ „  ƒ  YZ' d0 e f d1 „  ƒ  YZ( e% i) d2 ƒ e% i) d3 d4 ƒ e% i) d5 d6 ƒ d7 S(:   sP   
The I{sxbasic} module provides classes that represent
I{basic} schema objects.
iÿÿÿÿ(   t	   getLogger(   t   *(   t   splitPrefixt	   Namespace(   t   Parser(   t   TransportError(   t   urljoint   Factoryc           B   sî   e  Z d  Z h d „  d 6d „  d 6d „  d 6d „  d 6d	 „  d
 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d 6d „  d  6d! „  d" 6Z e d# „  ƒ Z e d' d% „ ƒ Z e d& „  ƒ Z RS((   s`   
    @cvar tags: A factory to create object objects based on tag.
    @type tags: {tag:fn,}
    c         C   s   t  |  | ƒ S(    (   t   Import(   t   xt   y(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   <lambda>,   s    t   importc         C   s   t  |  | ƒ S(    (   t   Include(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   -   s    t   includec         C   s   t  |  | ƒ S(    (   t   Complex(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   .   s    t   complexTypec         C   s   t  |  | ƒ S(    (   t   Group(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   /   s    t   groupc         C   s   t  |  | ƒ S(    (   t   AttributeGroup(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   0   s    t   attributeGroupc         C   s   t  |  | ƒ S(    (   t   Simple(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   1   s    t
   simpleTypec         C   s   t  |  | ƒ S(    (   t   Element(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   2   s    t   elementc         C   s   t  |  | ƒ S(    (   t	   Attribute(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   3   s    t	   attributec         C   s   t  |  | ƒ S(    (   t   Sequence(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   4   s    t   sequencec         C   s   t  |  | ƒ S(    (   t   All(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   5   s    t   allc         C   s   t  |  | ƒ S(    (   t   Choice(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   6   s    t   choicec         C   s   t  |  | ƒ S(    (   t   ComplexContent(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   7   s    t   complexContentc         C   s   t  |  | ƒ S(    (   t   SimpleContent(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   8   s    t   simpleContentc         C   s   t  |  | ƒ S(    (   t   Restriction(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   9   s    t   restrictionc         C   s   t  |  | ƒ S(    (   t   Enumeration(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   :   s    t   enumerationc         C   s   t  |  | ƒ S(    (   t	   Extension(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ;   s    t	   extensionc         C   s   t  |  | ƒ S(    (   t   Any(   R	   R
   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   <   s    t   anyc         C   s8   |  i  i | i ƒ } | d j	 o | | | ƒ Sd Sd S(   s  
        Create an object based on the root tag name.
        @param root: An XML root element.
        @type root: L{Element}
        @param schema: A schema object.
        @type schema: L{schema.Schema}
        @return: The created object.
        @rtype: L{SchemaObject} 
        N(   t   tagst   gett   namet   None(   t   clst   roott   schemat   fn(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   create?   s    R   c         C   s¢   g  } x• | i  d t i ƒ D]~ } d | j p | i | j o[ |  i | | ƒ } | d j o q n | i | ƒ |  i | | | i ƒ  ƒ } | | _	 q q W| S(   s  
        Build an xsobject representation.
        @param root: An schema XML root.
        @type root: L{sax.element.Element}
        @param filter: A tag filter.
        @type filter: [str,...]
        @return: A schema object graph.
        @rtype: L{sxbase.SchemaObject}
        t   nsR   N(
   t   getChildrenR   t   xsdnsR/   R5   R0   t   appendt   buildt	   childtagst   rawchildren(   R1   R2   R3   t   filtert   childrent   nodet   childt   c(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR:   P   s     c   
      C   s3  g  } h  } h  } h  } h  } h  } xÕ | D]Í } t  | t t f ƒ o | i | ƒ q+ n t  | t ƒ o | | | i <q+ n t  | t ƒ o | | | i <q+ n t  | t ƒ o | | | i <q+ n t  | t ƒ o | | | i <q+ n | | | i <q+ Wx | D] }	 | i	 |	 ƒ qW| | | | | | | f S(   N(
   t
   isinstanceR   R   R9   R   t   qnameR   R   R   t   remove(
   R1   R>   t   importst   elementst
   attributest   typest   groupst   agrpsRA   t   i(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   collatef   s8      (   R   (   t   __name__t
   __module__t   __doc__R-   t   classmethodR5   R:   RL   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   $   s.   















t   RestrictionMatcherc           B   s   e  Z d  Z d „  Z RS(   s:   
    For use with L{NodeFinder} to match restriction.
    c         C   s   | i  ƒ  o | i d  j	 S(   N(   R&   t   refR0   (   t   selft   n(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   matchˆ   s    (   RM   RN   RO   RU   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRQ   „   s   t   TypedContentc           B   s#   e  Z d  Z e d „ Z d „  Z RS(   s*   
    Represents any I{typed} content.
    c         C   s
  |  i  ƒ  } | d  j o |  Sd | } |  i i | ƒ } | d  j	 o | S|  } t | ƒ } |  g | _ t i d |  i | | ƒ | i	 |  i
 ƒ } | d  j o  t i |  i
 ƒ t | ƒ ‚ n | |  i | <| i ƒ  o | o
 |  } q| } n | i | ƒ } | S(   Ns   resolved:nb=%ss   %s, resolving: %s
 using:%s(   t   qrefR0   t   cacheR.   t	   TypeQueryt   historyt   logt   debugt   idt   executeR3   t   TypeNotFoundt   builtint   resolve(   RS   t	   nobuiltinRW   t   keyt   cachedt   resultt   queryt   resolved(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRa      s,    


c         C   se   |  i  } | d j oK g  } t ƒ  } t | d ƒ } | i |  | ƒ t | ƒ o | d i Sn | S(   sÏ   
        Get the I{type} qualified reference.
        This method takes into account types defined
        through restriction.
        @return: The I{type} qualified reference.
        @rtype: qref
        i   i    N(   t   typeR0   RQ   t
   NodeFindert   findt   lenRR   (   RS   RW   t   lst   mt   finder(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRW   ª   s    		(   RM   RN   RO   t   FalseRa   RW   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRV   Œ   s   R   c           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s”   
    Represents an (xsd) schema <xs:complexType/> node.
    @cvar childtags: A list of valid child node names
    @type childtags: (I{str},...)
    c      	   C   s   d
 S(   NR   R   R   R   R    R"   R$   R,   R   (	   s	   attributes   attributeGroups   sequences   alls   choices   complexContents   simpleContents   anys   group(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   Ä   s            c         C   s   d S(   NR/   (   s   name(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   descriptionÐ   s    c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R*   t   TrueRo   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR*   Ó   s
    
 	(   RM   RN   RO   R;   Rp   R*   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ½   s   		R   c           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   sŽ   
    Represents an (xsd) schema <xs:group/> node.
    @cvar childtags: A list of valid child node names
    @type childtags: (I{str},...)
    c         C   s   d S(   NR   R   R    (   s   sequences   alls   choice(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   á   s    c         C   sŽ   g  } d  } |  i d  j	 oh t |  i ƒ } | i |  i ƒ } | d  j o# t i |  i ƒ t |  i ƒ ‚ n | i | ƒ d } n | | f S(   Ni    (	   R0   RR   t
   GroupQueryR^   R3   R[   R\   R_   R9   (   RS   t   depst   midxRf   t   g(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   dependenciesä   s    
c         C   s    t  i |  | ƒ | i |  _ d  S(   N(   t   SchemaObjectt   mergeR<   (   RS   t   other(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRx   ñ   s    c         C   s   d S(   NR/   RR   (   s   names   ref(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   õ   s    (   RM   RN   RO   R;   Rv   Rx   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   Ú   s
   			R   c           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   s—   
    Represents an (xsd) schema <xs:attributeGroup/> node.
    @cvar childtags: A list of valid child node names
    @type childtags: (I{str},...)
    c         C   s   d S(   NR   R   (   s	   attributes   attributeGroup(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;      s    c         C   sŽ   g  } d  } |  i d  j	 oh t |  i ƒ } | i |  i ƒ } | d  j o# t i |  i ƒ t |  i ƒ ‚ n | i | ƒ d } n | | f S(   Ni    (	   R0   RR   t   AttrGroupQueryR^   R3   R[   R\   R_   R9   (   RS   Rs   Rt   Rf   t   ag(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRv     s    
c         C   s    t  i |  | ƒ | i |  _ d  S(   N(   Rw   Rx   R<   (   RS   Ry   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRx     s    c         C   s   d S(   NR/   RR   (   s   names   ref(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp     s    (   RM   RN   RO   R;   Rv   Rx   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ù   s
   			R   c           B   s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s:   
    Represents an (xsd) schema <xs:simpleType/> node
    c         C   s   d S(   NR&   R,   (   s   restrictions   any(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;     s    c         C   s6   x/ |  i  ƒ  D]! \ } } t | t ƒ o t Sq Wt S(   N(   R>   RB   R'   Rq   Ro   (   RS   R@   t   ancestry(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   enum   s
     	c         C   s   d S(   NR/   (   s   name(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   &  s    c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R*   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR*   )  s
    
 	c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R&   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR&   /  s
    
 	(   RM   RN   RO   R;   R}   Rp   R*   R&   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR     s   				R%   c           B   sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s;   
    Represents an (xsd) schema <xs:restriction/> node
    c         C   s)   t  i |  | | ƒ | i d ƒ |  _ d  S(   Nt   base(   Rw   t   __init__R.   RR   (   RS   R3   R2   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ;  s    c         C   s   d S(   NR(   R   R   (   s   enumerations	   attributes   attributeGroup(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   ?  s    c         C   sŸ   g  } d  } |  i d  j	 oy t |  i ƒ } | i |  i ƒ } | d  j o# t i |  i ƒ t |  i ƒ ‚ n | i ƒ  p | i	 | ƒ d } q• n | | f S(   Ni    (
   R0   RR   RY   R^   R3   R[   R\   R_   R`   R9   (   RS   Rs   Rt   Rf   t   super(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRv   B  s    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR&   P  s    c         C   s?   t  i |  | ƒ t t |  i ƒ } |  i |  i | i | ƒ d  S(   N(   Rw   Rx   t   FilterRo   R<   t   prepend(   RS   Ry   R=   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRx   S  s    c         C   s   d S(   NRR   (   s   ref(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   X  s    (	   RM   RN   RO   R   R;   Rv   R&   Rx   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR%   6  s   					t
   Collectionc           B   s   e  Z d  Z d „  Z RS(   sg   
    Represents an (xsd) schema collection node:
        - sequence
        - choice
        - all
    c         C   s   d S(   NR   R   R   R    R,   R   (   s   elements   sequences   alls   choices   anys   group(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   d  s    (   RM   RN   RO   R;   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRƒ   \  s   R   c           B   s   e  Z d  Z d „  Z RS(   s9   
    Represents an (xsd) schema <xs:sequence/> node.
    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   l  s    (   RM   RN   RO   R   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   h  s   R   c           B   s   e  Z d  Z d „  Z RS(   s4   
    Represents an (xsd) schema <xs:all/> node.
    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   t  s    (   RM   RN   RO   R   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   p  s   R   c           B   s   e  Z d  Z d „  Z RS(   s7   
    Represents an (xsd) schema <xs:choice/> node.
    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR    {  s    (   RM   RN   RO   R    (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   w  s   R!   c           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s?   
    Represents an (xsd) schema <xs:complexContent/> node.
    c         C   s   d S(   NR   R   R*   R&   (   s	   attributes   attributeGroups	   extensions   restriction(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   „  s    c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R*   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR*   ‡  s
    
 	c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R&   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR&     s
    
 	(   RM   RN   RO   R;   R*   R&   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR!     s   		R#   c           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s>   
    Represents an (xsd) schema <xs:simpleContent/> node.
    c         C   s   d S(   NR*   R&   (   s	   extensions   restriction(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   ™  s    c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R*   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR*   œ  s
    
 	c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R&   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR&   ¢  s
    
 	(   RM   RN   RO   R;   R*   R&   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR#   ”  s   		R'   c           B   s    e  Z d  Z d „  Z d „  Z RS(   s;   
    Represents an (xsd) schema <xs:enumeration/> node
    c         C   s)   t  i |  | | ƒ | i d ƒ |  _ d  S(   Nt   value(   t   ContentR   R.   R/   (   RS   R3   R2   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ®  s    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR}   ²  s    (   RM   RN   RO   R   R}   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR'   ©  s   	R   c           B   s_   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z RS(
   s8   
    Represents an (xsd) schema <xs:element/> node.
    c         C   s‚   t  i |  | | ƒ | i d ƒ } | d  j	 o | d j |  _ n |  i i d ƒ } | d  j	 o | d j |  _ n |  i ƒ  d  S(   Nt   formt	   qualifiedt   nillablet   1t   true(   R‰   s   true(   RV   R   R.   R0   t   form_qualifiedR2   Rˆ   t   implany(   RS   R3   R2   t   a(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   »  s    c         C   sG   |  i  d j o3 |  i d j o# |  i i ƒ  o |  i ƒ  |  _  n |  S(   sÀ   
        Set the type as any when implicit.
        An implicit <xs:any/> is when an element has not
        body and no type defined.
        @return: self
        @rtype: L{Element}
        N(   Rh   R0   RR   R2   t   isemptyt   anytype(   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRŒ   Å  s
    c         C   s   d S(   NR   R   R   R,   (   s	   attributes
   simpleTypes   complexTypes   any(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   Ó  s    c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R*   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR*   Ö  s
    
 	c         C   s*   x# |  i  D] } | i ƒ  o t Sq
 Wt S(   N(   R<   R&   Rq   Ro   (   RS   RA   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR&   Ü  s
    
 	c         C   sŽ   g  } d  } |  i d  j	 oh t |  i ƒ } | i |  i ƒ } | d  j o# t i |  i ƒ t |  i ƒ ‚ n | i | ƒ d } n | | f S(   Ni    (	   R0   RR   t   ElementQueryR^   R3   R[   R\   R_   R9   (   RS   Rs   Rt   Rf   t   e(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRv   â  s    
c         C   s    t  i |  | ƒ | i |  _ d  S(   N(   Rw   Rx   R<   (   RS   Ry   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRx   ï  s    c         C   s   d S(   NR/   RR   Rh   (   s   names   refs   type(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   ó  s    c         C   s^   t  i \ } } |  i i | ƒ } | d j o | } |  i i | | ƒ n d i | d f ƒ S(   s!    create an xsd:anyType reference t   :t   anyTypeN(   R   R8   R2   t
   findPrefixR0   t	   addPrefixt   join(   RS   t   pt   ut   mp(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ö  s    (   RM   RN   RO   R   RŒ   R;   R*   R&   Rv   Rx   Rp   R   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ¶  s   	
							R)   c           B   sD   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s:   
    Represents an (xsd) schema <xs:extension/> node.
    c         C   s)   t  i |  | | ƒ | i d ƒ |  _ d  S(   NR~   (   Rw   R   R.   RR   (   RS   R3   R2   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR     s    c         C   s   d S(   NR   R   R   R   R    R   (   s	   attributes   attributeGroups   sequences   alls   choices   group(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   	  s         c         C   sŸ   g  } d  } |  i d  j	 oy t |  i ƒ } | i |  i ƒ } | d  j o# t i |  i ƒ t |  i ƒ ‚ n | i ƒ  p | i	 | ƒ d } q• n | | f S(   Ni    (
   R0   RR   RY   R^   R3   R[   R\   R_   R`   R9   (   RS   Rs   Rt   Rf   R€   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRv     s    c         C   s?   t  i |  | ƒ t t |  i ƒ } |  i |  i | i | ƒ d  S(   N(   Rw   Rx   R   Ro   R<   R‚   (   RS   Ry   R=   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRx     s    c         C   s   |  i  d  j	 S(   N(   RR   R0   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR*   $  s    c         C   s   d S(   NRR   (   s   ref(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   '  s    (	   RM   RN   RO   R   R;   Rv   Rx   R*   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR)      s   					R   c           B   sS   e  Z d  Z h  Z e d d „ ƒ Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z RS(   sZ  
    Represents an (xsd) schema <xs:import/> node
    @cvar locations: A dictionary of namespace locations.
    @type locations: dict
    @ivar ns: The imported namespace.
    @type ns: str
    @ivar location: The (optional) location.
    @type location: namespace-uri
    @ivar opened: Opened and I{imported} flag.
    @type opened: boolean
    c         C   s(   | d j o
 | } n | |  i | <d S(   sB  
        Bind a namespace to a schema location (URI).  
        This is used for imports that don't specify a schemaLocation.
        @param ns: A namespace-uri.
        @type ns: str
        @param location: The (optional) schema location for the
            namespace.  (default=ns).
        @type location: str
        N(   R0   t	   locations(   R1   R6   t   location(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   bind:  s    
c         C   sz   t  i |  | | ƒ d  | i d ƒ f |  _ | i d ƒ |  _ |  i d  j o  |  i i |  i d ƒ |  _ n t |  _ d  S(   Nt	   namespacet   schemaLocationi   (	   Rw   R   R0   R.   R6   R›   Rš   Ro   t   opened(   RS   R3   R2   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   I  s     c         C   s£   |  i  o d St |  _  t i d |  i |  i d |  i ƒ |  i ƒ  } | d j o; |  i d j o t i d |  i d ƒ q |  i	 ƒ  } n t i d | ƒ | S(   sy   
        Open and import the refrenced schema.
        @return: The referenced schema.
        @rtype: L{Schema}
        Ns$   %s, importing ns="%s", location="%s"i   s   imported schema (%s) not-founds   imported:
%s(
   RŸ   Rq   R[   R\   R]   R6   R›   t   locateR0   t   download(   RS   Re   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   openQ  s    
	#c         C   s:   |  i  d |  i i d j o d S|  i i |  i  ƒ Sd S(   s    find the schema locally i   N(   R6   R3   t   tnsR0   R    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR    d  s    c         C   sÜ   |  i  } yz d | j o t |  i i | ƒ } n |  i i i } t | ƒ i d | ƒ i ƒ  } | i	 d | ƒ |  i i
 | | ƒ SWnR t j
 oF d |  i d | f } t i d |  i | d t ƒt | ƒ ‚ n Xd S(   s    download the schema s   ://t   urls$   imported schema (%s) at (%s), failedi   s   %s, %st   exc_infoN(   R›   R   R3   t   baseurlt   optionst	   transportR   t   parseR2   t   sett   instanceR   R6   R[   t   errorR]   Rq   t	   Exception(   RS   R¤   R¨   R2   t   msg(    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR¡   k  s    	c         C   s   d S(   NR6   R›   (   s   nss   location(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   z  s    N(   RM   RN   RO   Rš   RP   R0   Rœ   R   R¢   R    R¡   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   +  s   				R   c           B   sA   e  Z d  Z h  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sÏ   
    Represents an (xsd) schema <xs:include/> node
    @ivar location: The (optional) location.
    @type location: namespace-uri
    @ivar opened: Opened and I{imported} flag.
    @type opened: boolean
    c         C   sb   t  i |  | | ƒ | i d ƒ |  _ |  i d  j o  |  i i |  i d ƒ |  _ n t |  _ d  S(   NRž   i   (	   Rw   R   R.   R›   R0   Rš   R6   Ro   RŸ   (   RS   R3   R2   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ‰  s
     c         C   sQ   |  i  o d St |  _  t i d |  i |  i ƒ |  i ƒ  } t i d | ƒ | S(   sz   
        Open and include the refrenced schema.
        @return: The referenced schema.
        @rtype: L{Schema}
        Ns   %s, including location="%s"s   included:
%s(   RŸ   Rq   R[   R\   R]   R›   R¡   (   RS   Re   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR¢     s    
	c         C   sÜ   |  i  } y‡ d | j o t |  i i | ƒ } n |  i i i } t | ƒ i d | ƒ i ƒ  } | i	 d | ƒ |  i
 | ƒ |  i i | | ƒ SWnE t j
 o9 d | } t i d |  i | d t ƒt | ƒ ‚ n Xd S(   s    download the schema s   ://R¤   s   include schema at (%s), faileds   %s, %sR¥   N(   R›   R   R3   R¦   R§   R¨   R   R©   R2   Rª   t   _Include__applytnsR«   R   R[   R¬   R]   Rq   R­   (   RS   R¤   R¨   R2   R®   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR¡   ž  s    	
c         C   sr   d } | i  | ƒ } | d j o$ |  i i d } | i | | ƒ n) |  i i d | j o t d | ‚ n d S(   s)    make sure included schema has same tns. t   targetNamespacei   s   %s mismatchN(   R.   R0   R3   R£   Rª   R­   (   RS   R2   t   TNSR£   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt
   __applytns®  s    c         C   s   d S(   NR›   (    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   º  s    (	   RM   RN   RO   Rš   R   R¢   R¡   R¯   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ~  s   				R   c           B   sM   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 RS(   s/   
    Represents an (xsd) <attribute/> node
    c         C   s/   t  i |  | | ƒ | i d d d ƒ|  _ d  S(   Nt   uset   defaultt    (   RV   R   R.   R³   (   RS   R3   R2   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   Ã  s    c         C   s   d S(   NR&   (   s   restriction(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR;   Ç  s    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   isattrÊ  s    c         C   s   |  i  i d d d ƒS(   s   
        Gets the <xs:attribute default=""/> attribute value.
        @return: The default value for the attribute
        @rtype: str
        R´   Rµ   (   R2   R.   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   get_defaultÍ  s    c         C   s   |  i  d j S(   Nt   required(   R³   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   optionalÕ  s    c         C   sŽ   g  } d  } |  i d  j	 oh t |  i ƒ } | i |  i ƒ } | d  j o# t i |  i ƒ t |  i ƒ ‚ n | i | ƒ d } n | | f S(   Ni    (	   R0   RR   t	   AttrQueryR^   R3   R[   R\   R_   R9   (   RS   Rs   Rt   Rf   R   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRv   Ø  s    
c         C   s   d S(   NR/   RR   Rh   (   s   names   refs   type(    (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyRp   å  s    (
   RM   RN   RO   R   R;   R¶   R·   R¹   Rv   Rp   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR   ¾  s   						R+   c           B   s)   e  Z d  Z d „  Z d „  Z d „  Z RS(   s)   
    Represents an (xsd) <any/> node
    c         C   s;   |  i  i ƒ  } | i d d ƒ t |  i | ƒ } | g  f S(   Nt   notes   synthesized (any) child(   R2   t   cloneRª   R+   R3   (   RS   R/   R2   R@   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt	   get_childî  s    c         C   s;   |  i  i ƒ  } | i d d ƒ t |  i | ƒ } | g  f S(   NR»   s   synthesized (any) attribute(   R2   R¼   Rª   R+   R3   (   RS   R/   R2   R   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   get_attributeô  s    c         C   s   t  S(   N(   Rq   (   RS   (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR,   ú  s    (   RM   RN   RO   R½   R¾   R,   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyR+   é  s   		s)   http://schemas.xmlsoap.org/soap/encoding/s$   http://www.w3.org/XML/1998/namespaces   http://www.w3.org/2001/xml.xsds    http://www.w3.org/2001/XMLSchemas$   http://www.w3.org/2001/XMLSchema.xsdN(    (    (*   RO   t   loggingR    t   sudst   suds.xsdt   suds.xsd.sxbaset   suds.xsd.queryt   suds.saxR   R   t   suds.sax.parserR   t   suds.transportR   t   urlparseR   RM   R[   R   RQ   R…   RV   Rw   R   R   R   R   R%   Rƒ   R   R   R   R!   R#   R'   R   R)   R   R   R   R+   Rœ   (    (    (    sO   /usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.pyt   <module>   sD   



`1&J+S@+