The attribute is optional. But if it is there then it can assume any value other than 'isTimedOut' or 'result'.
But if I write the schema as I have shown, then every task must have an 'output' attribute, and this is happening because of the assert that I have put. So the optional thing is not happening if I have that assert. How to fix this? i.e. i need the assert and I need the optional behaviour too. Mukul Gandhi-4 wrote: > > On Sat, Oct 27, 2012 at 12:03 AM, pa7751 <pa7...@gmail.com> wrote: >> So what teh above intends is that some element has an 'output' attribute >> which is optional. > >> Now the problem is that in the xml I cannot have the element without >> 'output' attribute even though I am declaring it as optional. So if the >> tag >> does not define the output attrbute then the xml is not validated. Could >> anyone please suggest how to mandate the optional behaviour for this >> attribute. > > Your requirement seems to be ambiguous. You say, that you want to > declare an attribute as "optional" in the schema, and you also say > that, your XML instance document must have that attribute (that means, > the attribute must be "mandatory" in the schema). These statements are > contradictory. > > I think, you need to specify your requirements more correctly. > > > > -- > Regards, > Mukul Gandhi > > --------------------------------------------------------------------- > To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org > For additional commands, e-mail: j-users-h...@xerces.apache.org > > > -- View this message in context: http://old.nabble.com/assert-error-using-schema-1.1-tp34607109p34608642.html Sent from the Xerces - J - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org