Jump to content

How are groups meant to be used?

Recommended Posts

When I read the documentation regarding the "group" element, it looks like it would be used similar to the "all", "any" or "choice" tags.

It also says that it has optional "name" and "ref" attributes that cannot be used simultaneously.


However, when I try to create a group within a sequence, I get a validation complaint that the required "ref" attribute is missing. The page at http://www.w3schools.com/schema/el_group.asp does not say anything about a situation where this would be required.


It does have an example where a group is declared with a name and then used, by reference, later within a complex type definition. There it makes sense that the "ref" attribute is required to reference the pre-defined group.


Is this something like a macro that can be used to name some elements to be used in multiple type definitions by reference?


Can a group be created within a sequence without a name or ref attribute?


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...