Hi,

I'm using Castor 0.9.3, but am still experiencing a complete lack of validation
exceptions during the unmarshalling of an invalid (according to the schema) XML
document.

My Castor installation is configured to use the standard SAXParser from the
Xerces V1.4.1 release ( the most up to date and XML Schema Recommendation
compliant). I have set the relevant castor.properties as follows:

org.exolab.castor.parser.validation=true
org.exolab.castor.parser.namespaces=true

org.exolab.castor.marshalling.validation=true

org.exolab.castor.sax.features=http://xml.org/sax/features/validation,
http://xml.org/sax/features/namespaces,
http://apache.org/xml/features/validation/schema,
http://apache.org/xml/features/validation/schema-full-checking

and also played with various combinations, but to no avail. I just can't seem to
get unmarshalling to fail with a schema validation error.

I've tried parsing the invalid XML document using the
org.apache.xerces.parsers.SAXParser on its own as both an org.xml.sax.XMLReader
and as an org.xml.sax.Parser

The schema validation exception is only ever thrown when parsing using
org.xml.sax.XMLReader. Parsing using org.xml.sax.Parser gives no validation
errors.

Is the fact that Castor unmarshalling uses an org.xml.sax.Parser for parsing (
rather than org.xml.sax.XMLReader ) the root of the my problem ?

Please put me out of my misery by letting me know if Castor should be trapping
XML Schema validation errors during unmarshalling.

Thanks,

Gary Janes
HSBC Investment Banking & Markets





The HSBC Group's website is at http://www.hsbc.com
************************************************************************
HSBC Bank plc, which is regulated in the UK by SFA, has issued the
information contained in this message (including any attached documents)
for its non-private customers only. This message and any attachments are
not an invitation to buy or sell securities or related financial instruments,
are confidential to the named recipient and may also be privileged. The 
information should not be reproduced and/or distributed to any other 
person. Internet communications are not secure and HSBC Bank plc 
accepts no legal responsibility for the contents of this message. 
HSBC Bank plc makes no representation and accepts no responsibility
or liability as to the completeness and accuracy of the information 
contained in this message. Opinions may change without notice and 
members of the HSBC Group may have positions in, or trade in instruments
mentioned in this message. Each page attached hereto must be read in
conjunction with any disclosure which forms part of it.
************************************************************************

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to