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


Name

empty — Empty content

Synopsis

"empty"

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

empty

Description

The empty pattern is used to define empty pattern nodesets—for example elements without child elements, text, or attributes. Note that it is mandatory to use this pattern in such cases (element foo{ } isn't forbidden) and that there is no such thing as an empty attribute (an attribute such as foo="" is considered to have a value of the empty string rather than being empty—having no value).

Example

element foo {
 element out {empty} &
 (
  element in1 {empty},
  element in2 {empty}
 )
}

This text is released under the Free Software Foundation GFDL.