def writeNSdict(self, nsdict):
for k,v in list(nsdict.items()):<EOL><INDENT>if (k,v) in _standard_ns: continue<EOL>rv = _reserved_ns.get(k)<EOL>if rv:<EOL><INDENT>if rv != v:<EOL><INDENT>raise KeyError("<STR_LIT>" + str((k,v)) + "<STR_LIT>")<EOL><DEDENT>continue<EOL><DEDENT>if k:<EOL><INDENT>self.dom.setNamespaceAttribute(k, v)<EOL><DEDENT>else:<EOL><INDENT>self.dom.setNamespaceAttribute('<STR_LIT>', v)<EOL><DEDENT><DEDENT>
Write a namespace dictionary, taking care to not clobber the
        standard (or reserved by us) prefixes.