Logo Search packages:      
Sourcecode: suds version File versions  Download package

def suds::sax::element::Element::nsdeclarations (   self  ) 

Get a string representation for all namespace declarations
as xmlns="" and xmlns:p="".
@return: A separated list of declarations.
@rtype: basestring

Definition at line 771 of file element.py.

00771                             :
        """
        Get a string representation for all namespace declarations
        as xmlns="" and xmlns:p="".
        @return: A separated list of declarations.
        @rtype: basestring
        """
        s = []
        myns = (None, self.expns)
        if self.parent is None:
            pns = Namespace.default
        else:
            pns = (None, self.parent.expns)
        if myns[1] != pns[1]:
            if self.expns is not None:
                d = ' xmlns="%s"' % self.expns
                s.append(d)
        for item in self.nsprefixes.items():
            (p,u) = item
            if self.parent is not None:
                ns = self.parent.resolvePrefix(p)
                if ns[1] == u: continue
            d = ' xmlns:%s="%s"' % (p, u)
            s.append(d)
        return ''.join(s)
    
    def match(self, name=None, ns=None):


Generated by  Doxygen 1.6.0   Back to index