'Apply the namespace to this node.  If the prefix is I{None} then
this element\'s explicit namespace I{expns} is set to the
URI defined by I{ns}.  Otherwise, the I{ns} is simply mapped.
@param ns: A namespace.
@type ns: (I{prefix},I{URI})'

def applyns(self, ns):

    if (ns is None):
        return
    if (not isinstance(ns, (tuple, list))):
        raise Exception('namespace    must    be    tuple')
    if (ns[0] is None):
        self.expns = ns[1]
    else:
        self.prefix = ns[0]
        self.nsprefixes[ns[0]] = ns[1]
