XML(DTD, XSL scheme)

http://www.w3school.com.cn

http://www.w3.org/TR/xmlschema-1/

http://www.w3.org/TR/xmlschema-2/#QName


XML  定义数据;

XSL  定义数据显示方式;

DTD, XSL scheme 定义数据格式;

XQUERY  定义数据库相关;

Xlink XPOINTER  超链接

Xpath

一、HTML:

HTML 被设计用来显示数据;

HTML 中使用的标签(以及 HTML 的结构)是预定义的;


二、XML: eXtensible Markup Language

与html完全不同。

XML 被设计用来传输和存储数据

XML 数据以纯文本格式进行存储,因此提供了一种独立于软件和硬件的数据存储方法

XML 标签没有被预定义。您需要自行定义标签

语法严格!

应该尽量避免使用属性。如果信息感觉起来很像数据,那么请使用子元素吧。便于扩展!

很多新的 Internet 语言是通过 XML 创建的:

XHTML - 最新的 HTML 版本

WSDL - 用于描述可用的 web service

WAP 和 WML - 用于手持设备的标记语言

RSS - 用于 RSS feed 的语言

RDF 和 OWL - 用于描述资源和本体

SMIL - 用于描述针针对 web 的多媒体


三、文档类型定义(DTD): 

可定义合法的XML文档构建模块。它使用一系列合法的元素来定义文档的结构。

<!ELEMENT 元素名称 类别>

<!ELEMENT 元素名称 (元素内容)>

<!ATTLIST 元素名称 属性名称 属性类型 默认值>

<!ENTITY 实体名称 "实体的值">


http://xmlsoft.org/xmldtd.html


Well what is validation and what is a DTD ?

DTD is the acronym for Document Type Definition. This is a description of the content for a family of XML files. This is part of the XML 1.0 specification, and allows one to describe and verify that a given document instance conforms to the set of rules detailing its structure and content.

Validation is the process of checking a document against a DTD (more generally against a set of construction rules).

The validation process and building DTDs are the two most difficult parts of the XML life cycle. Briefly a DTD defines all the possible elements to be found within your document, what is the formal shape of your document tree (by defining the allowed content of an element; either text, a regular expression for the allowed list of children, or mixed content i.e. both text and children). The DTD also defines the valid attributes for all elements and the types of those attributes. --------------- DTD定义了所有可能的元素和它们的属性;用来检查XML文件是否正确!


四、XML Schema:

描述 XML 文档的结构。

XML Schema 语言也称作 XML Schema 定义(XML Schema Definition,XSD)。

XML Schema 很快会在大部分网络应用程序中取代 DTD。

理由如下:

XML Schema 可针对未来的需求进行扩展
XML Schema 更完善,功能更强大
XML Schema 基于 XML 编写
XML Schema 支持数据类型
XML Schema 支持命名空间

在 XML 中,有 5 个预定义的实体引用:

&lt; < 小于
&gt; > 大于
&amp; & 和号
&apos; ' 单引号
&quot; " 引号

注释:在 XML 中,只有字符 "<" 和 "&" 确实是非法的。大于号是合法的,但是用实体引用来代替它是一个好习惯。


如单引号,实际显示为&amp;apos;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值