XML Schema annotation 元素
定义和用法
annotation 元素是一个顶层元素,规定 schema 的注释。
注释:可以包含 appinfo 元素(由应用程序使用的信息)和 documentation 元素(由用户读取或使用的注释或文本)。
元素信息
| 项目 | 说明 |
|---|---|
| 出现次数 | 在父元素中一次。 |
| 父元素 | 任何元素 |
| 内容 | appinfo、documentation |
语法
<annotationid=IDany 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>Cankaoshouce Note</xs:appInfo><xs:documentation xml:lang="en">This Schema defines a Cankaoshouce note!</xs:documentation></xs:annotation>...</xs:schema>