Name

rng:oneOrMore — Matches one or more occurrences of whatever its children match

XML syntax example

<element name="dates" datatypeLibrary="http://www.w3.org/
 2001/XMLSchema-datatype">
 <oneOrMore>
  <element name="date">
   <data type="dateTime" />
  </element>
 </oneOrMore>
</element>

Compact syntax example

element dates { element date { xsd:dateTime }+ }

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 oneOrMore pattern matches an instance with one or more children defined in oneOrMore. In the compact syntax, oneOrMore is represented by a plus sign, as in DTDs. oneOrMore cannot hold attribute element definitions. If multiple child patterns are present, they are treated as if they were wrapped by a group pattern.

See also

§1, optional, zeroOrMore

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.