Schema (XSD) 介绍

XML Schema is an XML-based alternative to DTD.
XML Schema是基于XML语言的,它是用于替代DTD的。

An XML schema describes the structure of an XML document.
一份XML schema文件描述了XML文档的结构。

The XML Schema language is also referred to as XML Schema Definition (XSD).
XML Schema语言也被称为XML Schema Definition (即:XSD)。

What You Should Already Know
你需要实现具备的知识
Before you continue you should have a basic understanding of the following:
在继续下面的学习之前,你需要掌握下面的知识:

HTML / XHTML
XML 和 XML 名称空间
了解DTD的基本知识
If you want to study these subjects first, find the tutorials on our Home page.
如果你希望事先学习上述知识,请参阅我们的教程主页。


--------------------------------------------------------------------------------

What is an XML Schema?
什么是XML Schema?
The purpose of an XML Schema is to define the legal building blocks of an XML document, just like a DTD.
XML Schema的作用是定义一份XML文档的合法组件群,这与DTD的作用类似。

An XML Schema:
一份XML Schema:

defines elements that can appear in a document
定义了可以出现在文档里的元素
defines attributes that can appear in a document
定义了可以出现在文档里的属性
defines which elements are child elements
定义了哪些元素是子元素
defines the order of child elements
定义了子元素的顺序
defines the number of child elements
定义了子元素的数量
defines whether an element is empty or can include text
定义了一个元素应是否为空,或这是否能包含文本
defines data types for elements and attributes
定义了元素和属性的数据类型
defines default and fixed values for elements and attributes
定义了元素和属性的默认值和固定值

--------------------------------------------------------------------------------

XML Schemas are the Successors of DTDs
XML Schema 是 DTD 的“接任者”
We think that very soon XML Schemas will be used in most Web applications as a replacement for DTDs. Here are some reasons:
我们认为XML Schema很快就会替代DTD,从而在大多数的网络应用程序中广泛使用。

XML Schemas are extensible to future additions
XML Schema对将来的附加内容是可扩展的
XML Schemas are richer and more powerful than DTDs
XML Schema内容比DTD丰富,功能也更强
XML Schemas are written in XML
XML Schema是用XML语言编写而成的
XML Schemas support data types
XML Schema支持数据类型
XML Schemas support namespaces
XML Schema支持命名空间

--------------------------------------------------------------------------------

XML Schema is a W3C Standard
XML Schema是W3C推荐的标准
XML Schema became a W3C Recommendation 02. May 2001.
XML Schema于2001年5月2日成为W3C推荐使用的标准。

You can read more about the XML Schema standard in our W3C tutorial.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值