xml schema----java Web

来源:互联网 发布:淘宝详情页生成器 编辑:程序博客网 时间:2024/05/17 00:56
1.xml schema符合xml语法结构
2.dom,sax等xml API恨容易解析出XML Schema文档中的内容
3.支持名称空间
4.支持更多的数据类型
5.文件以xsd为扩展名
6.schema文件叫模式文档,被schema约束的文件叫实例文档
7.模式文档以Schema元素作为root节点
8.schema用targetNamespace把元素绑定到URI上,用

elementFormDefault="qualified/unqualified"指定是否把所有元素都指定到

targetNamespace指定的URI
9.xmlns:声明名称空间对应的URI,没有指定xsd具体在哪
10.说明itcast名称空间来自http://www.itcast.cn
<itcast:书架 xmlns:itcast="http://www.itcast.cn">
</itcast>
11.xsi:schemaLocation="http://www.itcast.cn demo.xsd"
12.著名的命名空间:指定元素schemaLocation的约束文档

xmlns:xsi="http://www.w3c.org/2001/XMLSchema-instance"

13.<xs:element>
14.<xs:attribute>
15.<xs:restriction>
16.xsd指示器:
order: All Choice Sequence
Occurrence: maxOccurs minOccurs



0 0