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

def suds::sax::element::Element::findPrefixes (   self,
  uri,
  match = 'eq' 
)

Find all prefixes that has been mapped to a namespace URI.
The local mapping is searched, then it walks up the tree until
it reaches the top collecting all matches.
@param uri: A namespace URI.
@type uri: basestring
@param match: A matching function L{Element.matcher}.
@type match: basestring
@return: A list of mapped prefixes.
@rtype: [basestring,...]

Definition at line 598 of file element.py.

00598                                            :
        """
        Find all prefixes that has been mapped to a namespace URI.
        The local mapping is searched, then it walks up the tree until
        it reaches the top collecting all matches.
        @param uri: A namespace URI.
        @type uri: basestring
        @param match: A matching function L{Element.matcher}.
        @type match: basestring
        @return: A list of mapped prefixes.
        @rtype: [basestring,...]
        """
        result = []
        for item in self.nsprefixes.items():
            if self.matcher[match](item[1], uri):
                prefix = item[0]
                result.append(prefix)
        for item in self.specialprefixes.items():
            if self.matcher[match](item[1], uri):
                prefix = item[0]
                result.append(prefix)
        if self.parent is not None:
            result += self.parent.findPrefixes(uri, match)
        return result
    
    def promotePrefixes(self):


Generated by  Doxygen 1.6.0   Back to index