Martin,

I am by no means an expert when it comes to Castor XML, but I'd guess
that the default validation used by Castor XML for Java classes
generated by the source generator is different from the XML validation
performed by an XML parser such as Xerces. But as already said, there's
others with a more educated opinion .. ;-).

Having said that, you could use the org.exolab.castor.features property
as outlined below

 # Comma separated list of SAX 2 features that should be enabled
  # for the default parser
  #
  org.exolab.castor.features=

to instruct e.g. Xerces to validate an XML document during parsing. This
way - even when using a mapping file - you'd ensure that validation
against a DTD or a schema (whatever is specified in your XML source)
will be performed and reported to you through Castor.

I hope this helps.
Werner

Martin Gainty wrote:
> Werner:
> Has the bug reported by Christophe Melchior for using setMapping with
> Marshaller been addressed?
> http://www.mail-archive.com/[email protected]/msg00007.html
> Vielen Danke,
> Martin-
> ----- Original Message ----- From: "Werner Guttmann"
> <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, June 10, 2005 3:56 PM
> Subject: Re: [castor-user] Castor validation
> 
> 
>> Evaldas,
>>
>> yes, as long as you enable xml validation in castor.properties as
>> explained at http://castor.codehaus.org/conf-lib.html.
>>
>> Regards
>> Werner
>>
>> Evaldas Karazinas wrote:
>>
>>> Hello,
>>>
>>> Question: Can Castor validate xml data when marshalling against Schema.
>>>
>>> Thank You!
>>>
>>>
>>> -------------------------------------------------
>>> If you wish to unsubscribe from this list, please
>>> send an empty message to the following address:
>>>
>>> [EMAIL PROTECTED]
>>> -------------------------------------------------
>>>
>>>
>>
>>
>> -------------------------------------------------
>> If you wish to unsubscribe from this list, please
>> send an empty message to the following address:
>>
>> [EMAIL PROTECTED]
>> -------------------------------------------------
>>
>>
> 
> -------------------------------------------------
> If you wish to unsubscribe from this list, please send an empty message
> to the following address:
> 
> [EMAIL PROTECTED]
> -------------------------------------------------
> 
> 


-------------------------------------------------
If you wish to unsubscribe from this list, please 
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to