I have a schema, where there are 3 elements and these 3 elements still have more sub elements. Lets name 1st element as Header, 2nd one as record, 2rd one as footer.
There is one occurence of header, multiple occurences of record and one occurence of footer again.
so the input to schema looks like
header
record..
record..
...
..
footer
now my problem is . my schema is defined like this
<xs:element minOccurs="1" maxOccurs="1" name="HEADER">
<xs:element minOccurs="1" maxOccurs="unbounded" name="Record">
<xs:element minOccurs="1" maxOccurs="1" name="FOOTER">
when a file (with a header 2 records and footer)is parsed through this schema. the parser recognizes recognizes the header and both the records and gives an exception after recognizing the 2nd record and doesn't give the footer. How do we define max and min occurs when there are 2 or more elements and middle element has unbounded as max occurs