Jump to content

How are groups meant to be used?


mrmacro

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 comment
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
×
×
  • Create New...