Hi,

Xerces has nothing built-in which does this. You would have to build the 
expression yourself from the SAX (or internal XNI) events and then hook in 
your own extension to XMLErrorReporter [1] which replaces the replacement 
arguments for each of the error messages with your own.

Thanks.

[1] 
http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/impl/XMLErrorReporter.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

fikin <[EMAIL PROTECTED]> wrote on 05/14/2007 07:48:37 AM:

> i have an use case where the validation error message should contain
> the parsing stack as well.
> for example, instead of:
>      org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: 
>     Attribute 've1r' is not allowed to appear in element 'in:document'. 
> to print actually:
>      org.xml.sax.SAXParseException: cvc-complex-type.3.2.2: 
>      Attribute 've1r' is not allowed to appear in element '/in:
> root/in:document '.
> 
> any suggestions?


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

Reply via email to