W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2004

Replace the error during the Validation

From: Ferrari GIanni <Ferrari.gi@apss.tn.it>
Date: Fri, 6 Feb 2004 11:21:55 +0100
Message-ID: <D11D57B75A3CD411BF7F00E018C3356F018C0AD1@NTGEN05>
To: xmlschema-dev@w3.org
Good morning people,

I have a problem during the validation of XML Schema. I created voluntarily
an error in my XML Document so to control if my parser signed it. All was
ok, but I'm not able to capture the exception. The voluntarily error is: 


[Error] InvoiceXML.xml:22:62: cvc-datatype-valid.1.2.1: '' is not a valid
value for 'integer'.

[Error] InvoiceXML.xml:22:62: cvc-attribute.3: The value '' of attribute
'CAB' on element 'BankingEnds' is not valid with respect to its type,


And I would like to replace it with an easy new message like it:


   Error: the attribute integer have to contain zero. 


Now in my java code I wrote: 




}catch (SAXException e){


}catch (IOException e){


}catch (Exception e){




I looked that when i have the error my code doesn't entry in that catch.
What is the correct exception?

Probably this isn' the correct environment to write java problem, but the
problem depend from XML DOCUMENT.

Please someone can help me. Thank you so much.

Regards from Italy


Received on Friday, 6 February 2004 05:21:13 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:04 UTC