XML Schema annotation要素

定義と用法

annotation要素は、schemaのコメントを定義するトップレベル要素です。

注記:appinfo要素(アプリケーションで使用される情報)とdocumentation要素(ユーザーが読んだり使用したりするコメントやテキスト)を含むことができます。

要素情報

項目 説明
出現回数

親要素内で1回のみ出現。

親要素

任意の要素

内容 appinfo、documentation

文法

<annotation
id=ID
任意属性
>
(appinfo|documentation)*
</annotation>

(* 符号は、annotation 要素内でこの要素が0回または複数回出現することを示します。)

属性 説明
id オプション。この要素のユニークな識別子。
任意属性 オプション。non-schema ナンスペースを持つすべての他の属性を定義します。

例1

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
  <xs:appInfo>CodeW3C.com ノート</xs:appInfo>
  <xs:documentation xml:lang="en">
  このスキーマは CodeW3C.com のノートを定義しています!
  </xs:documentation>
</xs:annotation>
.
.
.
</xs:schema>