| 768 | _clear_id_cache(self) |
| 769 | |
| 770 | def setAttributeNS(self, namespaceURI, qualifiedName, value): |
| 771 | prefix, localname = _nssplit(qualifiedName) |
| 772 | attr = self.getAttributeNodeNS(namespaceURI, localname) |
| 773 | if attr is None: |
| 774 | attr = Attr(qualifiedName, namespaceURI, localname, prefix) |
| 775 | attr.value = value |
| 776 | attr.ownerDocument = self.ownerDocument |
| 777 | self.setAttributeNode(attr) |
| 778 | else: |
| 779 | if value != attr.value: |
| 780 | attr.value = value |
| 781 | if attr.isId: |
| 782 | _clear_id_cache(self) |
| 783 | if attr.prefix != prefix: |
| 784 | attr.prefix = prefix |
| 785 | attr.nodeName = qualifiedName |
| 786 | |
| 787 | def getAttributeNode(self, attrname): |
| 788 | if self._attrs is None: |