Name

rng:list — Breaks an element’s character content or an attribute value into whitespace-separated strings

XML syntax example

<element name="type" datatypeLibrary="http://www.w3.org/
 2001/XMLSchema-datatypes">
 <attribute name="values">
  <list>
   <data type="int"/>
   <data type="int"/>
   <data type="int"/>
  </list>
 </attribute>
 <empty/>
</element>

Compact syntax example

element type {
 attribute values { list { xsd:int, xsd:int, xsd:int } },
 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 list pattern matches a whitespace-separated list of values in an instance. list actually splits text nodes into tokens separated by whitespace, which allows each token to be matched individually by a RELAX NG pattern. If multiple child patterns are present, they are treated as if they were wrapped by a group pattern. To match possible multiple tokens, a list pattern should contain an explicit or implicit group pattern, a zeroOrMore pattern, or a oneOrMore pattern.

See also

§7, param, text, value

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.