XML Schema selector 元素
定義和用法
selector 元素指定XML 路徑語言(XPath) 表達式,該表達式為標識約束選擇一組元素(unique、key 和keyref 元素)。
元素信息
- 父元素: key, keyref, unique
語法
<selector
id=ID
xpath=a subset of XPath expression
any attributes
>
(annotation?)
</selector>
id=ID
xpath=a subset of XPath expression
any attributes
>
(annotation?)
</selector>
(? 符號聲明在restriction 元素中該元素可出現零次或一次。)
属性 | 描述 |
---|---|
id | 可选。规定该元素的唯一的 ID。 |
xpath | 必需。规定相对于所声明的元素的 XPath 表达式。该表达式标识应用标识约束(所声明的元素)的子元素。 |
any attributes | 可选。规定带有 non-schema 命名空间的任何其他属性。 |
完整XML Schema參考手冊