users@jaxb.java.net

Re: optional and conditional xml schema elements

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Mon, 05 Feb 2007 10:56:29 -0800

john.mcclain_at_homeq.com wrote:
> Is there a way to have optional elements in an xml schema be required if
> certain other elements exist or have a specific value.
> I.E
> if I have an optional element X, and a required element Y. What I would
> like is to enforce that when element Y = "COMPLETED", then element X
> exists?

Not really. In XML Schema at least.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com