RELAX NG by Eric van der Vlist will be published by O'Reilly & Associates (ISBN: 0596004214)

You are welcome to use our annotation system to give your feedback.


Name

data — data pattern

Class:

pattern

Synopsis

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

Description:

The data pattern matches a single text node and gives the possibility of restricting its values. This is different from the text pattern which matches zero or more text nodes and doesn't give any possibility to restrict 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.

Restrictions:

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

Example:

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

    <element name="isbn">
     <data type="token">
      <except>
       <value>0836217462</value>
      </except>
     </data>
    </element>
      

Attributes:

datatypeLibrary

The datatypeLibrary attribute defines the default datatype library. The value of datatypeLibrary is inherited.

ns

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

type

The type attribute specifies the datatype used for evaluating the data pattern. Any text node whose value isn't valid according to this datatype fails to match the data pattern.


You are welcome to use our annotation system to give your feedback.
[Annotations for this page]
All text is copyright Eric van der Vlist, Dyomedea. During development, I give permission for non-commercial copying for educational and review purposes. After publication, all text will be released under the Free Software Foundation GFDL.