XML Schema selector 元素


XML Schema 參考手冊 完整 XML Schema 參考手冊

定義和用法

selector 元素指定 XML 路徑語言 (XPath) 運算式,該運算式為標識約束選擇一組元素(unique、key 和 keyref 元素)。

元素資訊

  • 父元素: key, keyref, unique

語法

<selector
id=ID
xpath=a subset of XPath expression
any attributes
>

(annotation?)

</selector>

(? 符號聲明在 restriction 元素中該元素可出現零次或一次。)

屬性 描述
id 可選。規定該元素的唯一的 ID。
xpath 必需。規定相對於所聲明的元素的 XPath 運算式。該運算式標識應用標識約束(所聲明的元素)的子元素。
any attributes 可選。規定帶有 non-schema 命名空間的任何其他屬性。


XML Schema 參考手冊 完整 XML Schema 參考手冊