Prasad Jandrajupalli
Prasad Jandrajupalli

Reputation: 59

what is the difference between element and sequence for minoccurs and maxoccurs in xsd

I am new to XSD, could you please help me for the following question:

What is the difference between element and sequence for minoccurs and maxoccurs in xsd.

thanks in advance.

Prasad J

Upvotes: 3

Views: 337

Answers (1)

Xstian
Xstian

Reputation: 8272

w3schools

Reference

sequence

  • maxOccurs Optional. Specifies the maximum number of times the sequence element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1
  • minOccurs Optional. Specifies the minimum number of times the sequence element can occur in the parent element. The value can be any number >= 0. Default value is 1

element

  • maxOccurs Optional. Specifies the maximum number of times this element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1. This attribute cannot be used if the parent element is the schema element
  • minOccurs Optional. Specifies the minimum number of times this element can occur in the parent element. The value can be any number >= 0. Default value is 1. This attribute cannot be used if the parent element is the schema element

Upvotes: 1

Related Questions