RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)

You are welcome to use our annotation system to give your feedback.


Name

pattern|pattern — choice pattern

Class:

pattern

Synopsis

pattern ("|" 
pattern)+

May be included in:

(pattern), attribute, datatypeName param exceptPattern, element, list, mixed, pattern&pattern, pattern*, pattern+, pattern,pattern, pattern?, pattern|pattern.

XML syntax equivalent:

choice

Description:

The choice pattern defines a choice between different patterns: it matches a node if and only if at least one of its sub-patterns matches this node.

Any number of patterns may be combined using the | operator when using this construct. One should note that different operators ( ,, |, and &) cannot be mixed at the same level.

Example:


 element name {
  text|(
   element first{text},
   element middle{text}?,
   element last{text}
  )}
 
   attribute available {"true"|"false"|"who knows?"}
      

You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.