users@jaxb.java.net

Re: Error parsing xhtml1-strict.xsd ""Lang" is already defined."

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Sun, 17 Aug 2008 07:22:53 +0200

Hi.

>> Well, but have you tried using the <jaxb:property> to resolve the
>> conflict as the tool suggests?
>
> The tool's suggestions are not acceptable in my situation. I am creating an
> automated tool that will use the schema to Java generation to create some
> beans skeleton classes. I don't want too much user intervention ..

Under these circumstances, JAXB is definitely not a tool of choice.
JAXB follows the defined XSD-Java mapping rules. Many of the schemas
out there may be mapped without customizations, but quite a large
percentage needs customized mappings.

Actually I doubt if any tool would be capable of this. If you have
mapping rules there will be definitely a schema which will break them.
Good luck.

> ... so I can't
> change every schema that has an error and I am certainly not going to modify
> the official W3C XHTML 1.0 schema to suit the XJC tool.

You certainly don't have to modify the official schema, you may define
jaxb:property customization in the exernal bindings file.

> I should not have
> to. I was hoping there was a way around it that would not require user
> intervention, but it seems there is not.

You're probably right. Surely you can diagnose some of problematic
situations, but there's no way to resolve al the possible conflicts.

> As usual it looks like I'll be rolling my own.

Would be interesing if you'll drop a line about the solution you will
have finally developed. Thanks!

Bye.
/lexi