当前位置: 首页 > 网络学院 > XML相关教程 > Schema (XSD) > XML Schema selector 元素
The selector element specifies an XPath expression that selects a set of elements for an identity constraint (unique, key, and keyref elements).
selector元素指定了一个XPath表达式,该表达式是用于选择一组用于确认特征限制(unique[独立的]、key[键]以及keyref 元素)的元素的。
<selector id=ID xpath=a subset of XPath expression any attributes > (annotation?) </selector> |
(The ? sign declares that the element can occur zero or one time inside the selector element)
“?”符号用于声明元素在selector元素中允许出现的次数(0次或1次)
属性 | 描述 |
---|---|
id | Optional. Specifies a unique ID for the element 可选参数。为元素指定一个独立的ID |
xpath | Required. Specifies an XPath expression, relative to the element being declared, that identifies the child elements to which the identity constraint applies 必要参数。指定一个与被声明元素相关的XPath表达式,该被声明元素是用于确定一个子元素(该子元素包含特征限制)的 |
any attributes | Optional. Specifies any other attributes with non-schema namespace 可选参数。指定非schema命名空间的其它属性 |