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


Name

value — Match a text node and a value

Synopsis

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

Class

pattern

May be included in

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

Compact syntax equivalent

datatypeName literal

Description

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

Restrictions

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

Example

<attribute name="see-also">
 <list>
  <oneOrMore>
   <choice>
    <value>0836217462</value>
    <value>0345442695</value>
    <value>0449220230</value>
    <value>0449214044</value>
    <value>0061075647</value>
   </choice>
  </oneOrMore>
 </list>
</attribute>
<attribute name="available">
 <data type="boolean">
  <except>
   <value>0</value>
   <value>1</value>
  </except>
 </data>
</attribute>
<attribute name="available">
 <data type="boolean">
  <except>
   <value type="boolean">false</value>
  </except>
 </data>
</attribute>

Attributes

datatypeLibrary

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

ns

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

type

This attribute specifies which datatype to use to perform the comparison. Note that this isn't an inherited attribute. When it isn't specified, the comparison is done using the default datatype, the token datatype of RELAX NG's built-in type library. Because of this, a string comparison is done on the values after space normalization.


This text is released under the Free Software Foundation GFDL.