Gavin Stokes wrote:
> What workaround strategies are people using to rename elements?  cloneNode
> wouldn't appear to facilitate this.

XSLT Maybe?  

> It's ridiculous that the DOM doesn't allow you to set an element's name.

I'm not so sure.  A lot of people have argued that the values of the DOM
as a whole should be immutable, and I tend to agree.  The name of a node
is generally bound to its context, whether that be DTD, Schema, or
whatever.  Changing the name of a node presents potential problems
beyond the actual naming.  One of them being that you invalidate a
document by doing it.  

Another is that your DOM implementation may be creating specially
subclassed DOM nodes based on the name of the node.  These subclassed
nodes may be used for data binding, or special application purposes.  If
you change the name of the node, what happens to the class of the node? 
It can't spontaneously become a different class that maps to the new
name, and as a result, the overall behavior of the DOM as a whole
becomes questionable.

Just my opinion though.
--Tom

-- 
Tom Bradford --- The dbXML Project --- http://www.dbxml.org/
We store your XML data a hell of a lot better than /dev/null

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to