Name

rng:zeroOrMore — Matches zero or more occurrences of whatever its children match

XML syntax example

<element name="name">
 <element name="givenname"><text/></element>
 <zeroOrMore>
  <element name="middlename"><text/></element>
 </zeroOrMore>
 <element name="familyname"><text/></element>
</element>

Compact syntax example

element name {
  element givenname { text },
  element middlename { text }*,
  element familyname { text }
}

Parents

attribute, choice (( ) and |), define (name of pattern followed by =), element, except (-), group (( ) and ,), interleave (&), list, mixed, oneOrMore (+), optional (?), start (start followed by =), zeroOrMore (*)

Description

The zeroOrMore pattern matches zero or more occurrences of its children in a schema. In the compact syntax, zeroOrMore is represented by *, as in DTDs. If multiple child patterns are present, they are treated as if they were wrapped by a group pattern.

See also

§1, oneOrMore, optional

Get XML Pocket Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.