XML Schema minOccurs / maxOccurs default values

I’m wondering how the XML Schema specification handles these cases:

<xsd:element minOccurs="1" name="asdf"/>

No maxOccurs given -> Is this the cardinality [1..1]?

<xsd:element minOccurs="5" maxOccurs="2" name="asdf"/>

I suppose this is simply invalid?

<xsd:element maxOccurs="2" name="asdf"/>

Is this the cardinality [0..2] or [1..2]?

Is there an “official” definition on how the XML Schema spec handles these cases?

3 Answers
3

Leave a Comment