Hello Michael,

many thanks for the extra quick help!
And it works:-)

Have a good weekend.
Best regards
Roman



From:        Michael Kay <mike@saxonica.com>
To:        Mailing list for the SAXON XSLT and XQuery processor <saxon-help@lists.sourceforge.net>,
Date:        04.07.2014 17:22
Subject:        Re: [saxon] net.sf.saxon.s9api.SchemaValidator - full error message




Call validator.setErrorListener() to supply your own ErrorListener().

Each validation error is reported to the ErrorListener, and the information that is passed contains all the information that the default ErrorListener writes to System.err.

You can consult the source code for the StandardErrorListener for guidance; you could also write your ErrorListener as a subclass of the StandardErrorListener.

If you simply want to get the StandardErrorListener output directed to a different output destination, you can do that using the Configuration property FeatureKeys.STANDARD_ERROR_OUTPUT_FILE.

Michael Kay
Saxonica
mike@saxonica.com
+44 (0118) 946 5893



On 4 Jul 2014, at 15:48, Roman Manz <RManz@amadeus.com> wrote:

Hello Saxon believers,

I have a very short question.

I am using
net.sf.saxon.s9api.SchemaValidator to validate some files. When there is an error, a SaxonApiException is thrown and a message gets written to System.error.
The System.error message contains an explanation that helps to understand what the problem is, for example:

Validation error on line 15 column 20
 XTTE1510: Validating Database/@status: Value "Deployed, Not In Production" contravenes the

 enumeration facet "End of Life, Deployed, In Prod..." of the type of attribute status (See

 
http://www.w3.org/TR/xmlschema-1/#cvc-complex-type clause 3)

However, in the exception's detailMessage there is only this:

ValidationException: One or more validation errors were reported


Is there a way to tell net.sf.saxon.s9api.SchemaValidator putting the full detail in the exception? Or is there an easy way to channel System.error through my own custom output stream (you see, I am a real Java expert)?


Many thanks!

Best regards

Roman



IMPORTANT  -  CONFIDENTIALITY  NOTICE  - This e-mail is intended only for the use of the individual or entity shown above as addressees. It may contain information which is privileged, confidential or otherwise protected from disclosure under applicable laws.  If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, printing, distribution, copying, disclosure or the taking of any action in reliance on the contents of this information is strictly prohibited.  If you have received this transmission in error, please immediately notify us by reply e-mail or using the address below and delete the message and any attachments from your system.

Amadeus Data Processing GmbH
Geschäftsführer: Dr. Wolfgang Krips
Sitz der Gesellschaft: Erding
HR München 48 199
Berghamer Strasse 6
85435 Erding
Germany
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards

http://p.sf.net/sfu/Bonitasoft_______________ _________________________ _______
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft____ _________________________ __________________
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help




IMPORTANT  -  CONFIDENTIALITY  NOTICE  - This e-mail is intended only for the use of the individual or entity shown above as addressees. It may contain information which is privileged, confidential or otherwise protected from disclosure under applicable laws.  If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, printing, distribution, copying, disclosure or the taking of any action in reliance on the contents of this information is strictly prohibited.  If you have received this transmission in error, please immediately notify us by reply e-mail or using the address below and delete the message and any attachments from your system.

Amadeus Data Processing GmbH
Geschäftsführer: Dr. Wolfgang Krips
Sitz der Gesellschaft: Erding
HR München 48 199
Berghamer Strasse 6
85435 Erding
Germany