Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1502842
  • 博文数量: 3500
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 43870
  • 用 户 组: 普通用户
  • 注册时间: 2008-05-03 20:31
文章分类

全部博文(3500)

文章存档

2008年(3500)

我的朋友

分类:

2008-05-04 20:00:20

一起学习
I keep hearing about alternatives to DTDs. What's a schema? A DTD is for specifying the structure (only) of an XML file: it gives the names of the elements, attributes, and entities that can be used, and how they fit together. Because DTDs were designed for use with traditional text documents, they have no mechanism for defining the content of elements in terms of data types, because XML has no data types: text is just text. A DTD therefore cannot be used to specify numeric ranges or to define limitations or checks on the text content, only on the markup that surrounds it. The XML Schema recommendation provides a means of specifying element content in terms of data types, so that document type designers can provide criteria for validating the content of elements as well as the markup itself. Schemas are written as XML files, thus avoiding the need for processing software to be able to read XML Declaration Syntax, which is different from XML Instance Syntax. Schemas are now a formal Recommendation, and a number of sites are serving useful applications as both DTDs and Schemas, eg and There is a separate Schema FAQ at The term `vocabulary' is sometimes used to refer to `DTDs and Schemas' together. Authors and publishers should note that the plural of Schema is Schemas: the use of the singular to do duty for the plural is a foible dear to the semi-literate; the use of the old (Greek) plural schemata is now unnecessary didacticism. Writers should also note that the plural of DTD is DTDs: there is no apostrophe. Bob DuCharme adds: Many XML developers were dissatisfied with the syntax of the markup declarations described in the XML spec for two reasons. First, they felt that if XML documents were so good at describing structured information, then the description of a document type's own structure (its schema) should be in an XML document instead of written with its own special syntax. In addition to being more consistent, this would make it easier to edit and manipulate the schema with regular document manipulation tools. Secondly, they felt that traditional DTD notation didn't allow document type designers the power to impose enough constraints on the data -- for example, the ability to say that a certain element type must always have a positive integer value, that it may not be empty, or that it must be one of a list of possible choices. This eases the development of software using that data because the developer has less error-checking code to write. 下载本文示例代码


I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....I keep hearing about alternatives to DTDs. Wh ....
阅读(53) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~