by Eric van der Vlist is published by O'Reilly & Associates (ISBN: 0596004214)


Name

mixed — Pattern for mixed content models

Synopsis

"mixed" "{" 
pattern "}"

Restrictions

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

mixed

Description

The mixed pattern is a shortcut for interleave with an embedded text pattern. It describes unordered content models in which a text node may be included before and after each element. Note that RELAX NG doesn't allow adding constraints to these text nodes.

Restrictions

The limitations of interleave apply here:

  • The mixed pattern can't be used within a list.

  • Elements within a mixed pattern can't have overlapping name classes.

  • There must no other text pattern in each set of patterns combined by mixed.

Example

element title {
 mixed {
  attribute xml:lang {text}&
  element a {attribute href {text}, text} *
 }
}
is equivalent to:
element title {
 ( text & (
  attribute xml:lang {text}&
  element a {attribute href {text}, text} *
 )
}
which itself is equivalent to:
element title {
  text & 
  attribute xml:lang {text}&
  element a {attribute href {text}, text} *
}

This text is released under the Free Software Foundation GFDL.