当前位置: 首页 > 网络学院 > XML相关教程 > Schema (XSD) > XML Schema 注解元素

Schema (XSD)
Schema (XSD) 介绍
为何使用 XML Schemas?
如何定制 XSD
XSD - <schema>元素
XSD 简单元素
XSD 属性
XSD 约束面
XSD 复合元素
XSD 复合空元素
XSD 复合纯元素
XSD 复合纯文本
XSD 混合内容的复合类型
XSD 指示器复合类型
XSD <any> 元素
XSD <anyAttribute> 元素
XSD 元素替代
XSD 实例
XSD 字符串数据类型
XSD 日期数据类型
XSD 小数数据类型

Schema (XSD) 中的 XML Schema 注解元素


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 333 ::
收藏到网摘: n/a

Definition and Usage
定义和用法

The annotation element is a top level element that specifies schema comments. The comments serve as inline documentation.
注释元素是一个顶级元素,它指明了schema注释。该注释是作为内置文档出现的。

Element Information
元素信息

  • Parent elements: Any element
    父元素:任何元素

Syntax
语法

<annotation
id=ID
any attributes
>
(appinfo|documentation)*
</annotation>

(The * sign declares that the element can occur zero or more times inside the annotation element)
符号用于声明元素可以在annotation元素中出现的次数(0次或多次)。

属性 描述
id Optional. Specifies a unique ID for the element
可选参数。为元素指定一个独立的ID
any attributes Optional. Specifies any other attributes with non-schema namespace
可选参数。指定其它的属性(这些属性无schema命名空间)

Example 1
案例1

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation> <xs:appInfo>W3Schools Note</xs:appInfo> <xs:documentation xml:lang="en"> This Schema defines a W3Schools note! </xs:documentation>
</xs:annotation>
.
.
.
</xs:schema>

评论 (0) All

登陆 | 还没注册?