Name
list — Text node split
Synopsis
element list { ( attribute ns { text }?, attribute datatypeLibrary { xsd:anyURI }?, attribute * - (rng:* | local:*) { text }* ), ( ( element * - rng:* { ... }* ) & ( element element { ... } | element attribute { ... } | element group { ... } | element interleave { ... } | element choice { ... } | element optional { ... } | element zeroOrMore { ... } | element oneOrMore { ... } | element list { ... } | element mixed { ... } | element ref { ... } | element parentRef { ... } | element empty { ... } | element text { ... } | element value { ... } | element data { ... } | element notAllowed { ... } | element externalRef { ... } | element grammar { ... } )+ ) }
Class
pattern
May be included in
attribute
, choice
,
define
, element
,
except
, group
,
interleave
, list
,
mixed
, oneOrMore
,
optional
, start
,
zeroOrMore
Compact syntax equivalent
list
Description
The list
pattern splits a text node into tokens
separated by whitespace. The splitting allows the validation of these
tokens separately. This practice is most useful for validating lists
of values.
Restrictions
interleave
can’t be used withinlist
.The content of a
list
is only about data: it’s forbidden to defineelement
,attribute
, ortext
there.It’s forbidden to embed
list
intolist
.
Example
<attribute name="see-also"> <list> <zeroOrMore> <data type="token"/> </zeroOrMore> </list> </attribute> <attribute name="dimensions"> <list> <data type="xs:decimal"/> <data type="xs:decimal"/> <data type="xs:decimal"/> <choice> ...
Get RELAX NG 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.