Name

datatypeName literal — Matches a text node and a value

Synopsis

[datatypeName] 
literal
                  

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

value

Description

The datatypeName literal pattern matches a text node against a value using the semantic of a specified datatype to perform the comparison.

When datatypeName is omitted, the default datatype (which is the token datatype from the RELAX NG built in library) is used.

Restrictions

The datatypeName literal pattern is meant for data-oriented applications and can’t be used in mixed-content models.

Example

"0"

xs:integer "0"
xs:boolean "false"
attribute available {xs:boolean "true"}

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.