Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

XML Schema list Element

XML Schema list Element


XML Schema Reference Manual Complete XML Schema Reference Manual


Definition and Usage

The list element defines a collection of single simpleType definitions.

Element Information

Syntax

id=ID

itemType=QName

any attributes

(annotation?,(simpleType?))

(The ? symbol declares that within the list element, the element can appear zero or one time.)

property Description
id Optional. Specifies a unique ID for the element.
itemType The name of a built-in data type or simpleType element defined in this schema (or in another schema indicated by the specified namespace). The simpleType element containing the list element is derived from the simple type specified by the list value. The list value must be a qualified name (QName). This attribute is not allowed if the content contains a simpleType element; otherwise it is required.
any attributes Optional. Specifies any other attributes with a non-schema namespace.

Example 1

The following example shows a simple type for a list of integers:

  

The "intvalues" element in the document looks like this (note that this list has five list items):

100 34 56 -23 1567

Note: Spaces are used as separators for the list items.

Example 2

The following example shows a simple type for a list of strings:

  

The "stringvalues" element in the document looks like this (note that this list has four list items):

I love XML Schema


XML Schema Reference Manual Complete XML Schema Reference Manual