XML Schema 註釋 元素
❮ 完整的 XML Schema 參考
定義和用法
annotation 元素是一個頂層元素,用於指定模式註釋。這些註釋用作內聯文件。
元素資訊
- 父元素: 任何元素
語法
<annotation
id=ID
任何屬性
>
(appinfo|documentation)*
</annotation>
(星號 * 表示該元素可以在 annotation 元素內出現零次或多次)
Attribute | 描述 |
---|---|
id | 可選。指定元素的唯一 ID |
任何屬性 | 可選。指定任何其他非 schema 名稱空間的屬性 |
示例 1
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>W3Schools 註釋</xs:appinfo>
<xs:documentation xml:lang="en">
此 Schema 定義了一個 W3Schools 註釋!
</xs:documentation>
</xs:annotation>
.
.
.
</xs:schema>
❮ 完整的 XML Schema 參考