- From: Benjamin C. Chang <Ben.Chang@oracle.com>
- Date: Wed, 25 Jun 2003 23:17:11 -0700
- To: Curt Arnold <carnold@houston.rr.com>
- CC: www-dom@w3.org, w3c-dom-wg@w3.org
Curt Arnold wrote:
> 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)
The "passed-in" adjective was deleted. A config attribute of type
DOMConfiguration has been added to the DocumentEditVAL
interface to allow the
setting of the error handler. The validateDocument method
returns a validation state constant.
Ben
Received on Thursday, 26 June 2003 02:17:30 UTC