Name

rng:group — Matches whatever its child patterns match in sequence

XML syntax example

<element name="mylist">
 <zeroOrMore>
  <element name="item">
   <choice>
    <element name="name">
     <text/>
    </element>
    <group>
     <element name="givenname">
      <text/>
     </element>
     <element name="familyname">
      <text/>
     </element>
    </group>
   </choice>
   <element name="e-mail">
    <text/>
   </element>
   <optional>
    <element name="description">
     <text/>
    </element>
   </optional>
  </element>
 </zeroOrMore>
</element>

Compact syntax example

element mylist {
  element item {
    (element name { text }
     | (element givenname { text },
        element familyname { text })),
    element e-mail { text },
    element description { 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 group pattern matches whatever its child patterns match in the order specified (order is disregarded for attribute patterns). Multiple patterns within define, oneOrMore, zeroOrMore, optional, list, or mixed elements are treated as if they were wrapped by a group pattern.

See also

§2, choice, interleave

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.