[ 
https://issues.apache.org/jira/browse/XERCESC-391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Boris Kolpackov updated XERCESC-391:
------------------------------------

      Priority: Minor  (was: Major)
      Assignee:     (was: Xerces-C Developers Mailing List)
    Issue Type: New Feature  (was: Bug)

> Make Error/Message Extension Of The XMLValidator Possible
> ---------------------------------------------------------
>
>                 Key: XERCESC-391
>                 URL: https://issues.apache.org/jira/browse/XERCESC-391
>             Project: Xerces-C++
>          Issue Type: New Feature
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 1.7.0
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Reid Spencer
>            Priority: Minor
>         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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to