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) — Container

Class:

pattern

Synopsis

"(" 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:

none

Description:

The (pattern) container is useful when grouping together patterns combined using , (ordered group), " |" (choice), or " &" (interleave). This container is treated itself as a pattern and may be combined with other patterns or quantified using qualifiers.

The operator " ,", " |" or " &" used within the (pattern) container defines how the sub patterns are combined and different operators cannot be mixed at the same level.

Even when such a container is not required, it may often be used to improve the readability of a schema.

Example:

 element name {
  text|(
   element first{text},
   element middle{text}?,
   element last{text}
  )}
  
 element foo {
  element out {empty} &
  (
   element in1 {empty},
   element in2 {empty}
  )
 }
      

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.