XML Schema annotation 元素
定義和用法
annotation 元素是一個頂層元素,規(guī)定 schema 的注釋。
注釋:可以包含 appinfo 元素(由應用程序使用的信息)和 documentation 元素(由用戶讀取或使用的注釋或文本)。
元素信息
項目 | 說明 |
---|---|
出現(xiàn)次數(shù) | 在父元素中一次。 |
父元素 | 任何元素 |
內(nèi)容 | appinfo、documentation |
語法
<annotation id=ID any attributes > (appinfo|documentation)* </annotation>
(* 符號聲明該元素可在 annotation 元素中出現(xiàn)零次或多次。)
屬性 | 描述 |
---|---|
id | 可選。該元素的唯一標識符。 |
any attributes | 可選。規(guī)定帶有 non-schema 命名空間的任何其他屬性。 |
例子 1
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:appInfo>W3School Note</xs:appInfo> <xs:documentation xml:lang="en"> This Schema defines a W3School note! </xs:documentation> </xs:annotation> . . . </xs:schema>