Name

rng:mixed — Matches a pattern with mixed element and text content

XML syntax example

<element name="para">
 <mixed>
  <zeroOrMore>
   <choice>
    <element name="italic"><text/></element>
    <element name="bold"><text/></element>
   </choice>
  </zeroOrMore>
 </mixed>
</element>

Compact syntax example

element para {
  mixed
{ (element italic { text } | element bold {
           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 mixed pattern matches a pattern of mixed text and elements in an instance. It is a shortcut for using the interleave element with a text element. The text element is assumed in mixed. If multiple child patterns are present, they are treated as if they were wrapped by a group pattern.

See also

§8, element, interleave, text

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.