Name

rng:empty — Specifies that the content of an element is empty

XML syntax example

<element name="photo">
 <attribute name="source"/>
 <empty/>
</element>

Compact syntax example

element photo { attribute source { text }, empty }

Parents

attribute, choice (( ) and |), define (name of pattern followed by =), element, except (-), group (( ) and ,), interleave (&), list, mixed, oneOrMore (+), optional (?), start (start followed by =), zeroOrMore (*)

Description

The empty pattern specifies empty content for an element. In RELAX NG, an element is considered empty if it contains whitespace only.

See also

§3, §10.1, element

Get XML Pocket Reference, 3rd Edition 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.