You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Stone, Timothy M" <ts...@ida.org> on 2010/03/29 20:01:48 UTC

Way to change format of schema error messages?

Greetings,

I'm using the C++ API (DOM Parser) to validate my XML files against an XSD.

I have previously seen error messages from the Java xerces validator which
seem more readable (ie, "Invalid content was found starting with element <>.
One of <> was expected")

The messages I am getting are a bit harder to read and understand.  Is it
possible to change this somehow or am I stuck with the existing messages?

thanks
tim

_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
Tim Stone                                    _/
Research Programmer/Analyst                 _/
Institute for Defense Analyses             _/
4850 Mark Center Dr.                      _/
Alexandria, VA 22311                     _/
(703) 845-6822                          _/
    "There's no place like 127.0.0.1"  _/
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/





---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: Way to change format of schema error messages?

Posted by David Bertoni <db...@apache.org>.
On 3/29/2010 11:01 AM, Stone, Timothy M wrote:
>
> Greetings,
>
> I'm using the C++ API (DOM Parser) to validate my XML files against an XSD.
>
> I have previously seen error messages from the Java xerces validator which
> seem more readable (ie, "Invalid content was found starting with element<>.
> One of<>  was expected")
>
> The messages I am getting are a bit harder to read and understand.  Is it
> possible to change this somehow or am I stuck with the existing messages?
You can change the messages, but to enhance the actual parameter values 
reported would require you to modify the code.

The text of the messages is in 
src/xercesc/NLS/EN_US/XMLErrList_EN_US.Xml. Once you modify this file, 
you will need to re-build the message using the Xlat tool, which is in 
tools/NLS/Xlat. There's a README in tools/NLS which explains the process.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org