Hi Gary,
Setting org.exolab.castor.parser.validation=true should enable parser
validation. If it doesn't, then there is a bug. I will look into it in
the morning.
Thanks,
--Keith
[EMAIL PROTECTED] wrote:
>
> Hi All,
>
> Please could somebody give me a definitive answer on whether Castor 0.9.3 should
> be throwing Schema validation exceptions/errors during unmarshalling ?
>
> I'm using the standard org.apache.xerces.parsers.SAXParser, which used outside
> of Castor as an org.xml.sax.XMLReader, happily throws exceptions as expected
> when parsing an invalid document.
>
> However, when the same invalid document is unmarshalled using Castor, I get
> absolutely nothing.
>
> I've set every validation related property I can find in castor.properties:
>
> 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
>
> but it has had absolutely no effect.
>
> Please tell me, what do I need to do to get Castor to generate Schema validation
> errors as expected when unmarshalling an invalid document. If I can't get Castor
> to do this I'm going to have to think about parsing separately before
> unmarshalling.
>
> Thanks in advance,
>
> Gary Janes
>
> 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
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev