users@jaxb.java.net

optional and conditional xml schema elements

From: <john.mcclain_at_homeq.com>
Date: Mon, 5 Feb 2007 13:06:58 -0500

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?
To take this a step further, is there a way to not only validate that
element X exists, but has a specific value?