Jump to content

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?

Link to post
Share on other sites
  • 3 months later...

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

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...