XML Schema key element
Definition and Usage
key elements of the specified attribute or element value (or set of values) must be a key within the specified range. Key range for instance document contains element. Key means that the data in the specified range should be unique, non-zero and is always present.
key element must contain the following elements in order:
- selector element contains an XPath expression that specifies a set of elements, the elements are concentrated, the value of the specified field must be unique.
Element Information
- Parent element: element
grammar
<key
id=ID
name=NCName
any attributes
>
(annotation?,(selector,field+))
</key>
id=ID
name=NCName
any attributes
>
(annotation?,(selector,field+))
</key>
(? Sign declares that the key element, the element can occur zero or one time, the + sign declares that the element must occur one or more times.)
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
name | 必需。规定 key 元素的名称。 |
any attributes | 可选。规定带有 non-schema 命名空间的任何其他属性。 |
Complete XML Schema Reference