Hello again, I have read the Message Board, and I don't understand:
"Castor only validates the object model based on schema constraints, not the actual XML instance document, since the parser can already do this. Just enable it via the castor.properties file (you'll see a comment for parser validation)." This means that then we execute this marshaller.marshal(object); automatic value validation against .xsd is not performed? Evaldas Citavimas Werner Guttmann <[EMAIL PROTECTED]>: > 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] > ------------------------------------------------- > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

