Name

rng:choice

Passt auf ein Muster oder eine Namensklasse aus einer Auswahl.

Beispiel für XML-Syntax

<choice>
 <element name="datum"><text/></element>
 <element name="name"><text/></element>
 <element name="zweck"><text/></element>
</choice>

Beispiel für kompakte Syntax

(element datum { text }
 | element name { text }
 | element zweck { text })

Eltern

attribute, choice, define, element, except, group, interleave, list, mixed, oneOrMore, optional, start, zeroOrMore

Beschreibung

Das choice-Muster passt auf ein Muster aus einer Menge von Mustern (wie Elemente oder Attribute) oder auf eine Namensklasse aus einer Menge von Namensklassen (wie etwa Namen in einem bestimmten Namensraum).

Siehe auch

§2, group, interleave

Get XML: kurz & gut 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.