XML Schema annotation 元素


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

定義和用法

annotation 元素是一個頂層元素,規定 schema 的注釋。

元素資訊

  • 父元素: 任何元素

語法

<annotation
id=ID
any attributes
>

(appinfo|documentation)*

</annotation>

(* 符號聲明該元素可在 annotation 元素中出現零次或多次。)

屬性 描述
id 可選。該元素的唯一識別字。
any attributes 可選。規定帶有 non-schema 命名空間的任何其他屬性。

實例 1

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:annotation>
  <xs:appinfo>zaixian Note</xs:appinfo>
  <xs:documentation xml:lang="en">
  This Schema defines a zaixian note!
  </xs:documentation>
</xs:annotation>

.
.
.

</xs:schema>


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