DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26437>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26437

XMLSchemaLoader doesn't handle ERROR_REPORTER correctly.

           Summary: XMLSchemaLoader doesn't handle ERROR_REPORTER correctly.
           Product: Xerces2-J
           Version: 2.6.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Other
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


After updating from CVS recently, I noticed that error messages generated by
XSDHandler were no longer being formatted correctly - the internal error domain
and key were just being output. Further investigation revealed that this was
happening when using the XMLGrammarPreparser; this has an XMLErrorReporter that
does not have a MessageFormatter for the XSMessageFormatter.SCHEMA_DOMAIN
domain. When the grammar preparser invokes an instance of XMLSchemaLoader, it
first sets the ERROR_REPORTER property on it. XMLSchemaLoader has a member field
for an error reporter, and this is initialised with the correct message
formatter. Two problems arise when calling setProperty(ERROR_REPORTER,
myErrorReporter):
1) The member field on XMLSchemaLoader is not updated with the new error
reporter,  so errors generated in this class always go to the default error handler

2) The error reporter passed in is not given an XSMessageFormatter for the
schema domain if it doesn't already have one. Instead it is put straight into
the ParserConfigurationSettings object. This doesn't cause a problem for the
XMLSchemaLoader itself, since it uses its member field error reporter, but it
does affect the XSDHandler that it kicks off, which takes its error reporter
from the ParserConfigurationSettings of the XMLSchemaLoader.... so it never
formats messages correctly!

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

Reply via email to