Revision 182289 of "DTD" on wuuwiki<!--00链接来着一个[[XML]]还弗勒里个页面。 要是倷是弗用心到该搭个说话,只要点击倷浏览器个返回揿钮
要创建该页面呢,就勒下底个框框里向开始写(帮助页面浪有更加多个信息)。 -->
<Div align="Center"><Big><Big>[http://www.zvon.org/xxl/DTDTutorial/General/book.html ZVON-DTD Tutorial]</Big></Big></div>
<!--。
警告: 倷弗曾登录。倷个IP//-->
'''文件类型定义'''(''DTD'')是一只<!--数的-->[[SGML]]搭仔[[XML Schema]]个描述语言,也是用来描述文件或部分是作者在DTD的语言。阿DTD是主要用于表达架构通过了一系列声明,符合特定标记的语法和描述了一类或类型,文件,在条件的制约的结构,该文件。阿的DTD也可宣布构造并非总是需要建立文件结构,但可能会影响某些文件的解释。 XML文件所描述使用DTD的一个子集实行了一些限制文件的结构,要求每XML标准( XML是本身就是一个应用的SGML优化自动解析) 。 DTDs写在正式的语法,说明正是其中的内容和实体可能会出现在该文件中,哪些要素的内容和属性。 DTD是本地的SGML格式和XML规范,因为它引入其他规范语言,例如XML模式和放松吴已被释放的额外功能。
作为一种表达模式,一个DTD的规定,实际上,语法的“申请”中的SGML或XML ,如衍生HTML语言或XHTML 。此语法通常是一个不太一般形式的语法的SGML或XML 。
在DTD的结构一类的文件是通过描述元素和属性列表声明。声明元素的名称允许的范围内规定的内容的文件,并指定是否以及如何申报的内容和运行的字符数据可能包含在每一个元素。属性名称清单申报的允许设置的属性每个申报内容,包括类型的每个属性值,如果没有一个明确的一套有效的值(县) 。
<!--
目录[隐藏]
1缔DTDs文件
1.1例子
2标记声明
2.1元素类型声明
2.2属性列表声明
2.3实体声明
2.4记法声明
3的XML DTDs和模式验证
4的XML DTD的范例
5另见
6参考
7外部链接
//-->
== 链界DTDs文件 ==
DTD与XML文件通过文件类型宣言,这是一个标记,似乎附近开始的XML文件。该宣言规定,该文件是一个实例类型定义的DTD的引用。
声明中的DTD分为内部和外部子集的子集。声明中的内部子集嵌入在文件类型宣言在文件本身。声明外部子都设在一个单独的文本文件。外部子集可参照通过公共标识和/或一个系统标识符。程序阅读文件不得要求改为外部子集。
<!--进来点啥
搭个改缔动-->
== 例子 ==
下面是一个例子文件类型宣言,其中包含公共和系统标识符:
<!--
“ !文档的HTML公众” - / /的W3C / / DTD的过渡时期的XHTML 1.0 / /英文“
“ http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ” “
“ !文档美孚[ ” !实体问候“ helloworld ” “ ] ”
“ !文档酒吧[ ” !实体问候“ helloworld ” “ ] ”
所有的HTML文件,预计4月1日,以符合三个的SGML DTDs 。公共标识符这些DTDs不断和如下:
- / /的W3C / / DTD的的HTML 4.01 / /英文
- / /的W3C / / DTD的过渡时期的HTML 4.01 / /英文
- / /的W3C / / DTD的框架的HTML 4.01 / /英文
//-->
<source lang="xml">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</source>
<source lang="xml">
<!DOCTYPE foo [ <!ENTITY greeting "helloworld"> ]>
<!DOCTYPE bar [ <!ENTITY greeting "helloworld"> ]>
</source>
该系统识别这些DTDs ,如果在文件类型宣言,将通用资源识别号引用。系统标识符可以各不相同,但预计将指向一组特定的声明中可以解决的位置。 SGML格式允许公共标识符映射到系统标识符目录的选择提供的URI解析器解析文件所使用的软件。
All HTML 4.01 documents are expected to conform to one of three SGML DTDs. The public identifiers of these DTDs are constant and are as follows:
* <code>[http://www.w3.org/TR/html4/strict.dtd -//W3C//DTD HTML 4.01//EN]</code>
* <code>[http://www.w3.org/TR/html4/loose.dtd -//W3C//DTD HTML 4.01 Transitional//EN]</code>
* <code>[http://www.w3.org/TR/html4/frameset.dtd -//W3C//DTD HTML 4.01 Frameset//EN]</code>
== <!--[编辑]-->标记声明 ==
在DTD的标记声明,宣布使用哪些要素类型,属性列表,实体和符号允许结构中的相应类别的XML文件。 <!--[ 1 ]
DTD Tutorial - Introduction
DTD is described in XML 1.0 standard. In this tutorial basic DTD features are demonstrated on many examples.
You can start from :
Example 1
Contents
See also
XML tutorial
XML Namespace tutorial
XHTML 1.0 reference
XHTML Basic
Related keywords: tutorial, DTD, XML, validation
Look at Law-Ref.org for an example of site running on Zvon technologies. The site features fully indexed and crosslinked documents pertinent to international law including Europe and US constitutions, Universal Declaration of Human Rights, Kyoto protocol, Agreement on Trade-Related Aspects of Intellectual Property Rights and many more.
This material has been developed for Zvon, where you can find other not only XML related materials (both basic and advanced tutorials and references about XSLT, XML, DTD, Mozilla, CSS, schemas, regular expressions, ...)
This material can be downloaded for off-line use.
//-->
== <!--[编辑]-->元类型声明 ==
一个内容类型声明定义的要素及其可能的内容。一个有效的XML文件只包含元素中定义的DTD的。
一个组成部分的内容是由一些关键的字词和字符:
空置没有内容
任何的任何内容 <!--
为订单
|替代( “或...或” )
( )的群体
明星的任何号码(零个或多个)
+至少一次(一个或多个)
?大关可选( 0个或1个)
如果没有人* , +或? ,元素必须发生整整时间
例如://-->
== 相关链接<!--ternal links//--> ==
<!--{{external links}}-->
* [http://www.w3.org/TR/REC-xml/#dt-doctype Definition of the XML document type declaration from Extensible Markup Language (XML) 1.0 (Fourth Edition) on W3.org]
* [http://www.mulberrytech.com/quickref/XMLquickref.pdf XML DTD Quick Reference]
* [http://xml.silmaril.ie/ The XML FAQ] has some DTD-specific entries
* [http://www.w3schools.com/dtd/default.asp DTD Tutorial from W3schools]
* [http://www.zvon.org/xxl/DTDTutorial/General/book.html Zvon DTD Tutorial] - in 7 languages
* [http://xmlzoo.net/xml/dtd Interactive DTD tutorial] from XMLzoo
* [http://gutfeldt.ch/matthias/articles/doctypeswitch/table.html Different doctypes for HTML]
* [http://www.xmlpatterns.com/ XMLPatterns.com - Design Patterns for developing DTDs]
* [http://www.lumrix.net/dtd2xs/ dtd2xs] Converts a DTD to an [[XML Schema (W3C)|XML Schema]]
* [http://sourceforge.net/projects/plainxml/ PlainXML] Converts a DTD to [[POJO]] objects
* [http://www.qindex.info/Q_get.php?g_clss=forum&g_prcss=thrd&g_tmplt=&g_brd=5&g_thrd=128 DTD Statistics]
<!--[[DTD]]-->
[[分类:XML]]All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://wuu.wikipedia.org/w/index.php?oldid=182289.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|