Vincent Lamareille wrote:
> But it seems really intricated to express this simple constraint in XML
> Schema with key's and keyref's and get it in code after compilation?
>
> Has somebody a simple explanation for this problem?
I didn't exactly follow the constraints you are trying to enforce, but
it's very normal for a schema not to capture all the necessary constraints.
Take schema-for-schemas as an example. When you say <xs:element
name="foo" type="something" />, there are referential integrity that
requires "something" to be defined as a type somewhere, but it is not
possible to capture this in a schema.
> Can I do it with jxb: annotations?
You can write code to check those constraints, but I don't think we have
any customizations like this.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com