[ http://nagoya.apache.org/jira/browse/XERCESC-391?page=history ]

Alberto Massari updated XERCESC-391:
------------------------------------

    Priority: Major

> Make Error/Message Extension Of The XMLValidator Possible
> ---------------------------------------------------------
>
>          Key: XERCESC-391
>          URL: http://nagoya.apache.org/jira/browse/XERCESC-391
>      Project: Xerces-C++
>         Type: Bug
>   Components: Validating Parser (Schema) (Xerces 1.5 or up only)
>     Versions: 1.7.0
>  Environment: Operating System: Linux
> Platform: PC
>     Reporter: Reid Spencer
>     Assignee: Xerces-C Developers Mailing List
>  Attachments: XMLValidator.cpp, XMLValidator.hpp, XMLValidityCodes.hpp
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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