The following comment has been added to this issue:

     Author: Michael Glavassevich
    Created: Thu, 22 Apr 2004 9:47 PM
       Body:
Thanks Naela. I've committed your patch to CVS with some modifications:

- added javadoc comments
- added method to XMLErrorCode so that it can be reused
- reuse error code used for comparisons in DOMErrorHandlerWrapper instead of creating 
a new one each time
- refactored table initialization code

I'm leaving this issue open because we still have many other internal error codes 
which need to be mapped to DOM error types.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESJ-949?page=comments#action_35231

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-949

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-949
    Summary: DOMError.type is not being set to the specified DOM value for certain 
errors
       Type: Bug

     Status: Open
   Priority: Minor

    Project: Xerces2-J
 Components: 
             DOM
   Versions:
             2.6.2

   Assignee: Michael Glavassevich
   Reporter: Naela Nissar

    Created: Wed, 21 Apr 2004 2:14 PM
    Updated: Thu, 22 Apr 2004 9:47 PM

Description:
XMLErrorReporter.reportError creates an XMLParseException and then uses a switch to 
send errors.  DOMErrorHandlerWrapper catches calls, where DOMError.type is always set 
to the value of key (an error can be characterized by a domain and key).  For certain 
errors (such as encountering a doctype when the configuration parameter 
'doctype-not-allowed' is true), LS spec specifies DOM specific strings for the value 
of DOMError.type, different than the key value that is being passed to the 
DOMErrorHandlerWrapper methods.  [1]

Proposed patch uses a HashMap to store and map the specific errors (represented by a 
domain and key --> see class XMLErrorCode) to their appropriate error type.   Within 
DOMErrorHandlerWrapper, the correct value for the error type is set; if the domain/key 
pair is contained within the HashMap, the error type it maps to is returned, if the 
error type returned was null, the domain/key pair is not contained, and the error type 
can be set to the value of the key. (As currently all the errors requiring mapping are 
reported to the wrapper as fatal errors, only error and warning methods have not been 
modified)

This affects W3C LS tests disallowdoctype01, unsupportedencoding01, 
wellformed01/02/03.  

[1]http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/load-save.html#LS-LSParser


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to