Name
rng:choice — Matches one of a choice of patterns or name classes
XML syntax example
<choice> <element name="date"><text/></element> <element name="name"><text/></element> <element name="purpose"><text/></element> </choice>
Compact syntax example
(element date { text } | element name { text } | element purpose { text })
Parents
,
attribute
,
choice
define
,
,
element
,
except
group
, interleave
, list
, mixed
, oneOrMore
, optional
, start
, zeroOrMore
Description
The choice
pattern matches
one of a set of patterns, such as elements or attributes, or one of
a set of name classes, such as names in a given namespace.
See also
§2, group
, 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.