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

Re: isWhitespaceInElementContent method

From: Philippe Le Hegaret <plh@w3.org>
Date: 28 Aug 2003 15:20:46 -0400
To: Curt Arnold <carnold@houston.rr.com>
Cc: WWW DOM <www-dom@w3.org>
Message-Id: <1062098446.23313.202.camel@jfouffa.w3.org>

On Tue, 2003-08-05 at 23:57, Curt Arnold wrote:
> I would suggest enhancing the stylesheet that generate the binding to 
> suppress the "get" when the property name starts with "is" and the type 
> is boolean.  An exception could be made for HTMLInputElement.isMap to 
> avoid breaking the existing interface definition.

done. For Java, if an attribute starts with "is" that is followed by an
upper case character, then the getter keeps the name as-is. The setter
replaces "is" with "set". Only exception is HTMLInputElement.isMap as
suggested. IsId and isWhitespaceInElementContent (now renamed to
isElementContentWhitespace) are back to be attributes again. 

> >The description says:
> >[[
> >The text node is determined to contain whitespace in element content
> >during the load of the document or if validation occurs while using
> >Document.normalizeDocument().
> >]]
> >
> MSXML.preserveWhitespace and JAXP's isIgnoringElementContentWhitespace() 
> had different interpretations of when whitespace should be preserved.  
> MSXML would discard whitespace without requiring a Document Type 
> Declaration which would result in whitespace being lost in the rare case 
> that the content model was mixed and only whitespace appeared in 
> addition to elements.  JAXP implementations would require a DTD and 
> validation (at least when the DTD was in an external subset) to be sure 
> that the content model was explicitly element-only.
> In addition, we have the example of Xerces's implying the need to load 
> an external subset DTD in order to provide default attribute values.  
> Similarly, you could imply that you need to load an external subset DTD 
> to determine if the content model was element-only or mixed so you could 
> properly determine this property.
> However, all this would be moot if "isWhitespace" and "isElementContent" 
> are separated.

We renamed the method to make it clear that it reflects the Infoset
property "elenment-content-whitespace". Also added a link to the Infoset
in the description.

Received on Thursday, 28 August 2003 15:22:46 UTC

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