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


Name

list — Text node split

Synopsis

element list
{
 (
 attribute ns { text }?,
 attribute datatypeLibrary { xsd:anyURI }?,
 attribute * - (rng:* | local:*) { text }*
 ),
 (
 ( element * - rng:* { ... }* )
 & (
 element element { ... }
 | element attribute { ... }
 | element group { ... }
 | element interleave { ... }
 | element choice { ... }
 | element optional { ... }
 | element zeroOrMore { ... }
 | element oneOrMore { ... }
 | element list { ... }
 | element mixed { ... }
 | element ref { ... }
 | element parentRef { ... }
 | element empty { ... }
 | element text { ... }
 | element value { ... }
 | element data { ... }
 | element notAllowed { ... }
 | element externalRef { ... }
 | element grammar { ... }
 )+
 )
}

Class

pattern

May be included in

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

Compact syntax equivalent

list

Description

The list pattern splits a text node into tokens separated by whitespace. The splitting allows the validation of these tokens separately. This practice is most useful for validating lists of values.

Restrictions

  • interleave can't be used within list.

  • The content of a list is only about data: it's forbidden to define element, attribute, or text there.

  • It's forbidden to embed list into list.

Example

<attribute name="see-also">
 <list>
  <zeroOrMore>
   <data type="token"/>
  </zeroOrMore>
 </list>
</attribute>
<attribute name="dimensions">
 <list>
  <data type="xs:decimal"/>
  <data type="xs:decimal"/>
  <data type="xs:decimal"/>
  <choice>
   <value>inches</value>
   <value>cm</value>
   <value>mm</value>
  </choice>
 </list>
</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 schema. The value is inherited.


This text is released under the Free Software Foundation GFDL.