Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

Cardinality represents the number of occurrences of a specific element within a content model

You can modify an element's cardinality by specifying the minOccurs and maxOccurs attributes within the element declaration. Some possible uses of the minOccursand maxOccursattributes include the following:  <element name="first" type="string" minOccurs="2" maxOccurs="2"/>  <element ref="target:first" maxOccurs="10"/>  <element name="location" ""minOccurs="0" maxOccurs="unbounded"/>  The default value for the minOccurs attribute and the maxOccurs attribute is 1.