Jump to content
tharpa

Are indicators required?

Recommended Posts

I'm looking at the documentation, and it doesn't actually say that indicators (sequence, all, choice) are required. But if I remove the indicators from an xsd that contains them, it does not validate.

 

I wish to create a schema that allows the elements to appear in any order, some of the elements can appear multiple times, and some of the elements are optional.

 

So, this means that, "all" is not suitable, because some of the elements may appear more than once.

 

I do not wish to use the "choice" indicator, because it would add undue complexity to what we are doing.

 

I do not wish to use the "sequence" indicator, because I have been told that the elements may appear in any order.

 

But if I do not use any of these three, the .xsd is considered invalid according to the online validator.

 

Any thoughts?

Share this post


Link to post
Share on other sites

If an element is to potentially contain one or more other elements, then it needs one or more of these to contain the "member" elements. Undue complexity is never the right thing to do. However, in this case it may actually be necessary complexity.

 

You didn't post any real details so I cannot get into any specifics.

You may also want to look at grouping to help you out.

 

Good Luck

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×