code: def getNamespaces(self):
          
          s = set()
          for n in self.branch + self.node.ancestors():
              if self.permit(n.expns):
                  s.add(n.expns)
              s = s.union(self.pset(n))
          return s
docs: Get the I{unique} set of namespaces referenced in the branch.
          @return: A set of namespaces.
          @rtype: set