XML Schema keyref Element
Complete XML Schema Reference Manual
Definition and Usage
The keyref element specifies that an attribute or element value (or a set of values) corresponds to the value of a specified key or unique element.
The keyref element must contain the following elements in order:
- There must be one and only one selector element.
- The selector element contains an XPath expression that designates a set of elements in which the values specified by field must be unique.
Element Information
- Parent elements: element
Syntax
id=ID name=NCName refer=QName any attributes (annotation?,(selector,field+)) (The ? symbol declares that within the key element, the element can appear zero or one time; the + symbol declares that the element must appear one or more times.)
property
Description
id
Optional. Specifies a unique ID for the element.
name
Required. Specifies the name of the key element.
refer
Required. Specifies the name of the key or unique element defined in this schema (or in another schema indicated by the specified namespace). The refer value must be a qualified name (QName). The type can include a namespace prefix.
any attributes
Optional. Specifies any other attributes with a non-schema namespace.
Complete XML Schema Reference Manual