W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2002

Re: Mixed level 1 and level 2 nodes woes

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Wed, 17 Jul 2002 11:16:56 -0400
To: "Sander Bos" <sander@x-hive.com>
Cc: "WWW DOM" <www-dom@w3.org>
Message-ID: <OF863FD87D.599DE2DA-ON85256BF9.00521B7C@us.ibm.com>

On Wednesday, 07/17/2002 at 04:31 ZE2, "Sander Bos" <sander@x-hive.com>
> I have some questions about documents with mixed level 1 and level 2
> nodes.

You can pass a Level 2 document down to Level 1 code and it will function
as a Level 1 DOM. You can _not_ create non-namespaced nodes and pass it
back up to Level 2 code and expect correct operation. This is by design;
the non-namespaced calls can be considered deprecated except for purely
Level 1 applications.

So you're asking about correct behavior for something that should never be
allowed to happen. Which is why it's undefined.

> I already know the standard answer: "Don't mix the two kinds of nodes
> then."
> That is very nice, but users are going to do that if you give them a
> chance

Users are "going to do" all sorts of things we don't support. That doesn't
necessarily mean we should support them.

> - createElement, createAttribute and setAttribute should create DOM
>level 2 nodes when the document element of the document is a level 2
>node (so localName should be set in that case).

We did discuss this during the design of DOM Level 2. Your proposed
solution is one of those which was placed on the table at that time. It was
rejected, partly because some folks insisted that a level 1 node *must*
have no prefix and no localname.

Changing this probably exceeds the bounds that could be handled as an
erratum. It's a significant redesign. Much as I would have preferred not to
have the distinction between "level 1 nodes" and "level 2 nodes", I think
you're going to face major objections to changing that design now.

Joe Kesselman  / IBM Research
Received on Wednesday, 17 July 2002 11:17:32 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:10 UTC