SUBSCRIBE JAXB-INTEREST Anonymous <bmadhuri_at_MYWAY.COM> wrote:
> We copy our application's class files onto production server as a jar
> file. I have two schema documents. one is main schema and another is
> list of values schema document. List of values schema document will be
> changing very often in future. without having to recompile and
> recreating the XJC classes, how can I create XML file using JAXB? I was
> using Validator class before to validate the output XML file against the
> schema document. I commented out this part and doing validation in a
> different program. But now, the defaultValidationEventHandler is
> checking against the XJC classes for enumerated values. How to turn this
> default validator off? Is it possible?
I'm not sure if I understand you correctly, but you can turn off the
validation during the unmarshalling and/or specify your own
ValidationEventHandler to unmarshallers. It will let you work with the
invalid documents.
Alternatively you could use <javaType> customization and write extra
error check code by yourself.
Finally, if you want to define an application specific datatype (such as
"a valid order id" or "a good credit card number"), RELAX NG lets you do
that easily.
regards,
--
Kohsuke Kawaguchi 408-276-7063 (x17063)
Sun Microsystems kohsuke.kawaguchi_at_sun.com