W3C home > Mailing lists > Public > public-webapi@w3.org > February 2008

Re: Setting EntityReference.nodeValue and EntityReference.prefix

From: Philippe Le Hegaret <plh@w3.org>
Date: Wed, 06 Feb 2008 13:33:47 -0500
To: Eric Seidel <eric@webkit.org>
Cc: www-dom@w3.org, Maciej Stachowiak <mjs@apple.com>, public-webapi@w3.org
Message-Id: <1202322827.7725.57.camel@localhost>

[adding the Web API Group since thy are the ones who work on the
maintenance of the DOM Level 3 Core nowadays]


setting Node.prefix when it is defined to be null is a no-op. it
shouldn't raise an exception.

So, for Node.prefix, it should read:
NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly and if it
is not defined to be null.

On Tue, 2008-02-05 at 22:21 -0800, Eric Seidel wrote:
> EntityReferences are always readonly nodes.  The spec seems ambiguous  
> here.  The main text for each property would suggest that neither  
> should raise if the property value is always defined to be null.   
> However, the exception explanations suggest that entityRef.nodeValue =  
> 'foo' should not raise (silently fail) and yet entityRef.prefix =  
> "foo" should fail with NO_MODIFICATION_ALLOWED_ERR.

It's an error in the DOM Level 3 specification. If you look at DOM Level
2, nodeValue and prefix says:
 When it is defined to be null, setting it has no effect.
  NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.

 The namespace prefix of this node, or null if it is unspecified.
  NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.

Looking at our internal archives, Elena Litani raised the issue on
nodeValue in February 2002. In September 2003, Johnny Stenback raised
the issue on prefix [1]. The resolution for prefix was:
"It is a no-op, similar to Node value."

We forgot to modify the exception as well when we changed the general
text and the editor of the spec (me in this case) didn't catch the



[1] http://www.w3.org/2003/06/09-dom-core-issues/issues.html#stenback-1
Received on Wednesday, 6 February 2008 18:34:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:09:58 UTC