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

text — Pattern matching text nodes

Class:

pattern

Synopsis

element text
{
   (
      attribute ns { text }?,
      attribute datatypeLibrary { xsd:anyURI }?,
      attribute * - (rng:* | local:*) { text }*
   ),
   ( element * - rng:* { ... }* )
}

May be included in:

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

Compact syntax equivalent:

text

Description:

The text pattern matches zero or more text nodes. The fact that a text pattern matches more than one text node has no effect when it is used in ordered content models (the data model used by RELAX NG for XML documents is similar to the data model of XPath 1.0 and two text nodes cannot be adjacent) but makes a difference when a text pattern is used in interleave:adding a single text pattern in an interleave pattern has the effect of allowing any number of text nodes which can interleave before and after each element (note that the mixed pattern is provided as a shortcut to define these content models).

Restrictions:

No more than one text pattern can be included in an interleave pattern.

Example:

  <element name="first"><text/></element>

   <element name="name">
    <choice>
     <text/>
     <group>
      <element name="first"><text/></element>
      <optional>
        <element name="middle"><text/></element>
      </optional>
      <element name="last"><text/></element>
     </group>
    </choice>
   </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 schema. The value of ns is inherited.


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.