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


data — data pattern


element data
 attribute type { xsd:NCName },
 attribute ns { text }?,
 attribute datatypeLibrary { xsd:anyURI }?,
 attribute * - (rng:* | local:*) { text }*
 ( element * - rng:* { ... }* )
 & ( element param { ... }*, element except { ... }? )



May be included in

attribute, choice, define, element, except, group, interleave, list, mixed, oneOrMore, optional, start, zeroOrMore

Compact syntax equivalent

datatypeName param exceptPattern


The data pattern matches a single text node (i.e., token, or attribute value) and gives the possibility of restricting its values. It is different from the text pattern, which matches zero or more text nodes and doesn't give any option for restricting the values of these text nodes. The restrictions are applied through the type attribute, which defines the datatype and the param and except child patterns.


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


<attribute name="see-also">
  <data type="token"/>
<attribute name="id">
 <data type="NMTOKEN">
   <param name="maxLength">16</param>
<element name="isbn">
 <data type="token">



This attribute defines the default datatype library. The value is inherited.


This attribute defines the default namespace for the elements defined in a portion of a schema. The value is inherited.


This attribute specifies the datatype used to evaluate the data pattern. Any text node whose value isn't valid according to this datatype fails to match the data pattern.

This text is released under the Free Software Foundation GFDL.