August 2003
Intermediate to advanced
624 pages
15h 3m
English
Where records (and occasionally fields or elements in an array) are allowed to repeat in a file, we usually need to set upper boundaries on how often they may appear. In addition, many applications such as EDI allow some data to be optional. We express these constraints in schema language through the minOccurs and maxOccurs Attributes. These are set on the child Elements in the content model. Again, if you turn back to SimpleCSV1.xsd, you can see a minOccurs="0" set on the ColumnXX Elements. Here it is again, in a single Element declaration from the sequence.
<xs:element name="Column01" type="xs:string" minOccurs="0"/>
To set a specific limit, we specify the appropriate integer value for the maxOccurs Attribute. ...