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=7440>. 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=7440 Make Error/Message Extension Of The XMLValidator Possible Summary: Make Error/Message Extension Of The XMLValidator Possible Product: Xerces-C++ Version: 1.7.0 Platform: PC OS/Version: Linux Status: NEW Severity: Enhancement Priority: Other Component: Validating Parser (Schema) (Xerces 1.5 or up only) AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The 1.7.0 xercesc/framework/XMLValidator class uses a message numbering and loading schema that does not lend itself to extension of the class. In my case, I am attempting to provide further semantic validation of a document by extending the class xercesc/validators/schema/SchemaValidator. To make XMLValidator a little more friendly to those wishing to extend it, I have made four new virtual functions in the XMLValidator interface. All four have default implementations and no code changes to any other classes were required. The new virtual functions are: getClassLoader, isWarning, isError, and isFatal. These four functions permit a subclass to determine which class loader gets loaded to generate the error message and to also decide which error codes are warnings, errors, or fatal. Previously, these capabilities were statically coded into XMLValidator and XMLValid. One other change is that XMLValid::Codes is now an unsigned integer rather than an enumeration. This change is needed in order to make it possible for subclasses to have their own range of error codes. XMLValidator reserves error numbers 0-9999 for its own use. Subclasses can pick any other range for their error numbers. The change to implement this consists of only three files: xercesc/framework/XMLValidator.hpp xercesc/framework/XMLValidator.cpp xercesc/framework/XMLValidityCodes.hpp All three files are provided as attachments and have been tested in the following environment (i.e. all Sample & Test programs work): Platform: PC (2 x 1GHz Pentium III ) Operating System: Linux 7.1 + updates (kernel = 2.4.9-31smp) Compiler: GCC 3.0.3 It would be great if these changes could be made to "stick" in future releases. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]