Latest web development tutorials

XML Schema keyref element

XML Schema Reference Complete XML Schema Reference

Definition and Usage

keyref element or elements specified attribute value (or set of values) corresponding to the value of the specified key or unique element.

keyref element must contain the following elements in order:

  • There must be one and only one selector element.
  • 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

<keyref
id=ID
name=NCName
refer=QName
any attributes
>

(annotation?,(selector,field+))

</include>

(? 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 元素的名称。
refer 必需。规定在该 schema(或由指定的命名空间指示的其他 schema)中定义的 key 或 unique 元素的名称。refer 值必须是限定名 (QName)。 类型可以包括命名空间前缀。
any attributes 可选。规定带有 non-schema 命名空间的任何其他属性。


XML Schema Reference Complete XML Schema Reference