geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rakesh Midha" <midha.rak...@gmail.com>
Subject Reason for sequence in XSD's
Date Fri, 12 Jan 2007 14:47:01 GMT
Hello

I was just wondering if there is any specific reason for using "sequence"
elements in all our XSD schema's instead of "choice" elements.

In most of the mapped J2EE schema's choice is used. Because we are using
sequence the order of elements is fixed, and if child elements are not in
order we get invalid element exception all the time.

If choice is used instead of sequence, we can definatly avoid those
exceptions.

Anyone got an idea, why it is so? I hope I am not missing something
important here.

Thanks
Rakesh

Mime
View raw message