specify occurrences

  • zeroOrMore

    Specify zero or more occurrences of a pattern.

    <element name="element-name">
      <zeroOrMore>
    	<element name="child1">
    		<text/>
    	</element>
    	<element name="child2">
    		<text/>
    	</element>
      </zeroOrMore>
    </element>
    					
  • oneOrMore

    Specify one or more occurrences of a pattern.

    <element name="element-name">
      <oneOrMore>
    	<element name="child1">
    		<text/>
    	</element>
    	<element name="child2">
    		<text/>
    	</element>
      </oneOrMore>
    </element>
    					
  • The same attribute cannot be defined more than once for an element, so Attributes are not allowed to be declared in a zeroOrMore or oneOrMore pattern.