Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

Group References

The <group> reference declaration allows you to refer to global element groups within your content model.  <group ref="global group definition"         minOccurs="non negative number"         maxOccurs="non negative number or unbounded">  This can be done by including a ref attribute and specifying the name of the global <group> declaration:  <group name="NameGroup">      <sequence>          <element name="first" type="string" minOccurs="1" maxOccurs="unbounded"/>          <element name="middle" type="string" minOccurs="0" maxOccurs="1"/>          <element name="last" type="string"/>      </sequence>  </group>  <element name="name">      <complexType>          <group ref="target:NameGroup"/>          <attribute name="title" type="string"/>      </complexType>  </element>