ŗō
ã=Pc           @   sq   d  Z  d d k l Z d d k Td d k l Z l Z e e  Z e i	 d  Z
 d   Z d d
 d     YZ d	 S(   sL  
The I{schema} module provides a intelligent representation of
an XSD schema.  The I{raw} model is the XML tree and the I{model}
is the denormalized, objectified and intelligent view of the schema.
Most of the I{value-add} provided by the model is centered around
tranparent referenced type resolution and targeted denormalization.
i˙˙˙˙(   t	   getLogger(   t   *(   t	   Namespacet   splitPrefixc         C   sŊ   d } t |   \ } } | d j	 o t | t t f  p | f } n x9 | D]1 } | i |  } | d d j	 o | } PqO qO W| d j o t d |   q¯ n | } | | d f S(   s˙  
    Get a reference that is I{qualified} by namespace.
    @param ref: A referenced schema type name.
    @type ref: str
    @param resolvers: A list of objects to be used to resolve types.
    @type resolvers: [L{sax.element.Element},]
    @param defns: An optional target namespace used to qualify references
        when no prefix is specified.
    @type defns: A default namespace I{tuple: (prefix,uri)} used when ref not prefixed.
    @return: A qualified reference.
    @rtype: (name, namespace-uri)
    i   s   prefix (%s) not resolvedN(   t   NoneR   t
   isinstancet   listt   tuplet   resolvePrefixt	   Exception(   t   reft	   resolverst   defnst   nst   pt   nt   rt   resolved(    (    s)   suds-0.3.7-py2.6.egg/suds/xsd/__init__.pyt   qualify    s     	c         C   sH   t  |  t  o8 t |   d j o% t  |  d t  o t  |  d t  S(   sĒ   
    Get whether the object is a I{qualified reference}.
    @param object: An object to be tested.
    @type object: I{any}
    @rtype: boolean
    @see: L{qualify}
    i   i    i   (   R   R   t   lent
   basestring(   t   object(    (    s)   suds-0.3.7-py2.6.egg/suds/xsd/__init__.pyt   isqref=   s    	t   Filterc           B   s   e  Z e d   Z d   Z RS(   c         G   s   | |  _  | |  _ d  S(   N(   t	   inclusivet   items(   t   selfR   R   (    (    s)   suds-0.3.7-py2.6.egg/suds/xsd/__init__.pyt   __init__M   s    	c         C   s0   |  i  o | |  i j } n | |  i j } | S(   N(   R   R   (   R   t   xt   result(    (    s)   suds-0.3.7-py2.6.egg/suds/xsd/__init__.pyt   __contains__P   s    
(   t   __name__t
   __module__t   FalseR   R   (    (    (    s)   suds-0.3.7-py2.6.egg/suds/xsd/__init__.pyR   L   s   N(    (   t   __doc__t   loggingR    t   sudst   suds.saxR   R   R   t   logt   defaultR   R   R   (    (    (    s)   suds-0.3.7-py2.6.egg/suds/xsd/__init__.pys   <module>   s   
	