| Workshops --> XML --> Demo --> schema14.html |
|---|
![]() |
|
Useful attributes for complex types
With the minoccurs and maxoccurs attributes, the number of times a component can appear in an element can be set
| A single element | A sequence of elements | A choice of elements | An unordered group | A named group |
The generic form is:
Using minOccurs, it looks like this:
This element must appear at least twice in the XML file for the document to be valid
The global declaration looks like this:
An example is
This xsd:element can then be referenced anywhere in the schema
Each appearance of the element can have different attributes (particularly minOccurs and maxOccurs)
|
||||||||||||||||||||||||
| Page by Howard Rosenbaum | |
| Find me at hrosenba@indiana.edu | You are here: http://www.slis.indiana.edu/hrosenba/www/Workshops/XML/Demo/schema14.html |