Index: xmltools.py =================================================================== RCS file: /cvs-repository/Packages/webdav/Attic/xmltools.py,v retrieving revision 1.15.2.1 diff -r1.15.2.1 xmltools.py 25,26c25,26 < - Check the methods Node.addNode, Node.remap and Node del_attr < and find out if some code uses/requires these methods. --- > - Check the methods Node.addNode > and find out if some code uses/requires this method. 31a32,40 > > - Get a clue if its bad or good for plain zope > that this module returns all strings as unicode type > > => maybe convert everything to strings and encode > (but where to get the encoding from?) > > => at least OFS.PropertySheets do not support webdav > unicode properties right now -> this sucks 50a60,62 > def attrs(self): > return [ Node(n) for n in self.node.attributes.values() ] > 62c74,82 < return self.toxml() --- > if self.node.nodeType == self.node.TEXT_NODE: > text = self.node.data > else: > # collect text subnodes > text = '' > for node in self.node.childNodes: > if node.nodeType == node.TEXT_NODE: > text += node.data > return text 65d84 < def attrs(self): return self.node.attributes 73,76c92,97 < # XXX: no support for removing attributes < # zope can calls this after remapping to remove namespace < # haven't seen this happening though < return None --- > # NOTE: zope calls this after remapping to remove namespace > # zope passes attributes like xmlns:n > # but the :n isnt part of the attribute name .. gash! > > attr = name.split(':')[0] > return self.node.removeAttribute(attr) 79,82c100,109 < # XXX: this method is used to do some strange remapping of elements < # and namespaces .. not sure how to do this with minidom < # and if this is even required for something < # zope calls this to change namespaces in PropPatch and Lock --- > # XXX: this method is used to do some strange remapping of elements > # and namespaces .. someone wants to explain that code? > > # XXX: i also dont understand why this method returns anything > # as the return value is never used > > # NOTE: zope calls this to change namespaces in PropPatch and Lock > # we dont need any fancy remapping here and simply remove > # the attributes in del_attr >