W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2003

Re: DOM Level 3 Validation update

From: Curt Arnold <carnold@houston.rr.com>
Date: Mon, 02 Jun 2003 23:56:02 -0500
Message-ID: <3EDC2A62.8090003@houston.rr.com>
To: "Benjamin C. Chang" <Ben.Chang@oracle.com>
CC: www-dom@w3.org, w3c-dom-wg@w3.org

Curt Arnold wrote:

> Benjamin C. Chang wrote:
> ...
>
>>> validateDocument:
>>>
>>> How would warnings be issued?  There appears to be an interface name
>>> missing between "[DOM Level 3 Core]" and "interface"
>>>   
>>
>>
>> The method makes use of the passed-in error handler, as described
>> in the DOM L3 CORE DOMConfiguration interface; warnings are
>> handled through this exception handler.  There is a link to this
>> interface now.
>>  
>>
>
> A return value from the validation would be useful when the only 
> interest was if the document was schema or DTD valid.  Without an 
> explicit return value, it might be inferred that validation could be 
> asynchronous. 


"Passed-in error handler" suggests that an instance of DOMErrorHandler 
is a parameter on the call to validateDocument.  If it were then there 
would be no need to reference the definition of DOMConfiguration. 

If the intention to cast the document to DOMConfiguration and call the 
setParameter("error-handler", errorHandler), then you would need to 
define what would occur if setParameter("schema-location",...) was 
called after loading but before calling validateDocument.  Changing the 
schema locations after document construction could be so disruptive that 
you may want to prevent it and use importNode when you want to recreate 
a document with a different schema.  If DOMConfiguration was then only 
used as part of document loading, it might be moved from Core to Load/Save.

My current preference is to define validateDocument as:

boolean validateDocument(DOMErrorHandler errorHandler)
Received on Tuesday, 3 June 2003 00:56:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT