免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
DTD教程

A Document Type Definition defines the legal building blocks of an XML document. It defines the document structure with a list of legal elements.
DTD(文本類型定義)定義了XML文件的合法組建群。它定義了帶有合法元素列表的文件結(jié)構(gòu)。

A DTD can be declared inline in your XML document, or as an external reference.
一份DTD可以在XML文件內(nèi)部聲明或者作為外部參數(shù)聲明。


Internal DOCTYPE declaration
內(nèi)部DOCTYPE聲明

If the DTD is included in your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:
如果DTD是包含在XML源文件里面的,那么它應該預先包裝在含有以下句法構(gòu)造的DOCTYPE定義當中。

<!DOCTYPE root-element [element-declarations]>

Example XML document with a DTD: (Open it in IE5, and select view source):
含有DTD的實例XML文件:在IE5中把它打開,選擇瀏覽源代碼:

<?xml version="1.0"?>

<!DOCTYPE note [
<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>
]>

<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>

<body>Don‘t forget me this weekend</body>
</note>

The DTD above is interpreted like this:
上面的DTD,如下解釋:

!DOCTYPE note (in line 2) defines that this is a document of the type note.
!DOCTYPE note(在第二行)定義了類型注釋的文件。
!ELEMENT note (in line 3) defines the note element as having four elements: "to,from,heading,body".
!ELEMENT note(第三行)定義了"to,from,heading,body"4個元素的note元素。
!ELEMENT to (in line 4) defines the to element  to be of the type "#PCDATA".
!ELEMENT to(第4行)解釋說明了成為"#PCDATA"類型之一的to元素。
!ELEMENT from (in line 5) defines the from element to be of the type "#PCDATA"
and so on.....
!ELEMENT from(第5行 )解釋說明了"#PCDATA"等等類型的form元素。

External DOCTYPE declaration
外部DOCTYPE聲明

If the DTD is external to your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:
如果DTD對于你的XML文件是外部而言,那么它會在含有以下句法構(gòu)造的DOCTYPE聲明中預先包裝進去。

<!DOCTYPE root-element SYSTEM "filename">

This is the same XML document as above, but with an external DTD:  (Open it in IE5, and select view source)
如同上面的,這是份一樣的 XML文件,但是帶有一份外DTD:在IE5中打開,選擇察看源代碼。

<?xml version="1.0"?>

<!DOCTYPE note SYSTEM "note.dtd">
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>

<body>Don‘t forget me this weekend!</body>
</note>

And this is a copy of the file "note.dtd" containing the DTD:
這是一份包含了DTD的"note.dtd"文件副本。

<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>


Why use a DTD?
為什么要使用DTD?

With DTD, each of your XML files can carry a description of its own format with it.
通過DTD,你的每一個XML文件都自身攜帶有關(guān)它自身格式的說明。

With a DTD, independent groups of people can agree to use a common DTD for interchanging data.
通過DTD,不同群體的人們可以對使用普通的DTD來交換數(shù)據(jù)的方法達成一致。

Your application can use a standard DTD to verify that the data you receive from the outside world is valid.
你的應用程序可以通過標準的DTD來驗證你從正當外界接收到的數(shù)據(jù)是有效的。

You can also use a DTD to verify your own data.
你也可以通過DTD來檢驗自身的數(shù)據(jù)。



DTD - XML 建立 blocks(二)
w3pop.com / 2006-09-21

DTD 介紹
DTD - 元素

The main building blocks of both XML and HTML documents are tags like <body>....</body>.
像<body>....</body>之類的標簽是XML和HTML文件的主組件群。


The building blocks of XML documents
XML文件的組件群

Seen from a DTD point of view, all XML documents (and HTML documents) are made up by the following simple building blocks:
從DTD來看,所有的XML文件(和HTML文件)都是由接下來的簡單組件群組成的:

  • Elements
    元素
  • Attributes
    屬性
  • Entities
    實體
  • PCDATA
    被解析的字符數(shù)據(jù)(Parsed Character Data)
  • CDATA
    字符數(shù)據(jù)值(Character Data)

The following is a brief explanation of each of the building blocks:
下面是每個組件群的簡短解釋。


Elements
元素

Elements are the main building blocks of both XML and HTML documents.
元素是XML和HTML文件的主組件群。

Examples of HTML elements are "body" and "table". Examples of XML elements could be "note" and "message". Elements can contain text, other elements, or be empty. Examples of empty HTML elements are "hr", "br" and "img".
HTML元素的實例是"body" 和"table"。XML元素實例是"note" 和"message"。元素可以包括文本、其它元素或者空值??罩礹tml元素的實例是"hr", "br" 和"img".

Examples:
例如:

<body>body text in between</body>
<message>some message in between</message>


Attributes
屬性

Attributes provide extra information about elements.
屬性提供關(guān)于元素的額外信息。

Attributes are always placed inside the starting tag of an element. Attributes always come in name/value pairs. The following "img" element has additional information about a source file:
屬性總是置于元素的開始標簽里面。屬性一般是以“名稱(name)/值(value)”這樣的形勢一對對的出現(xiàn)。下面的“img”元素就是關(guān)于源文件的補充信息:

<img src="computer.gif" />

The name of the element is "img". The name of the attribute is "src". The value of the attribute is "computer.gif". Since the element itself is empty it is closed by a " /".
元素名稱是“img”。屬性名稱“src”。屬性值是"computer.gif"。因為元素自身是空值,所以它是以“/”結(jié)束的。


Entities
實體

Entities are variables used to define common text. Entity references are references to entities.
實體是對于定義普通文件的變量。實體參數(shù)是定義實體的參數(shù)。

Most of you will know the HTML entity reference: " ". This "no-breaking-space" entity is used in HTML to insert an extra space in a document. Entities are expanded when a document is parsed by an XML parser.
很多人都知道HTML實體參數(shù):" "。這里的"no-breaking-space"實體是在HTML中用來在文本中插入一個額外空間的。當XML剖析器解析文件時,實體就會得到擴展。

The following entities are predefined in XML:
下面的實體是在XML中預定的:

Entity References
實體參數(shù)
Character
字符
< <
> >
& &
" "
'
 

PCDATA

PCDATA means parsed character data.
PCDATA的意思是被解析的字符數(shù)據(jù)。

Think of character data as the text found between the start tag and the end tag of an XML element.
把字符數(shù)據(jù)當作XML元素的開始標簽與結(jié)束標簽之間的文本。

PCDATA is text that will be parsed by a parser. Tags inside the text will be treated as markup and entities will be expanded. 
剖析器會分析PCDATA文本。文本中的標簽會被當作標示的字體,實體將會擴展。


CDATA

CDATA also means character data.
CDATA也是字符數(shù)據(jù)的意思。

CDATA is text that will NOT be parsed by a parser. Tags inside the text will NOT be treated as markup and entities will not be expanded.
剖析器不會解析CDATA文本。文本中的標簽不會作為標示字體,實體也將不會得到擴展。



DTD - 元素(三)
w3pop.com / 2006-09-21

DTD - XML 建立 blocks
DTD - 屬性

In a DTD, XML elements are declared with a DTD element declaration.
在DTD中,XML元素是用DTDA元素的聲明方式來聲明的。


Declaring an Element
聲明元素

In the DTD, XML elements are declared with an element declaration. An element declaration has the following syntax:
在DTD中,XML元素是用XML元素的聲明方式來聲明的。元素的聲明方式含有以下句法構(gòu)造:

<!ELEMENT element-name category>
or
<!ELEMENT element-name (element-content)>


Empty elements
空元素

Empty elements are declared with the category keyword EMPTY:
空元素是用類別關(guān)鍵字EMPTY來聲明的:

<!ELEMENT element-name EMPTY>

example:
<!ELEMENT br EMPTY>
XML example:
<br />


Elements with only character data
純字符數(shù)據(jù)的元素

Elements with only character data are declared with #PCDATA inside parentheses:
純字符數(shù)據(jù)的元素用圓括號中的#PCDATA來聲明:

<!ELEMENT element-name (#PCDATA)>

example:
<!ELEMENT from (#PCDATA)>


Elements with any contents
以any內(nèi)容聲明的元素

Elements declared with the category keyword ANY, can contain any combination of parsable data:
以類別關(guān)鍵字ANY聲明的元素能包括任何部分數(shù)據(jù)的結(jié)合體。

<!ELEMENT element-name ANY>
example:
<!ELEMENT note ANY>


Elements with children (sequences)
以child關(guān)鍵字聲明的元素(按次序排列)

Elements with one or more children are defined with the name of the children elements inside parentheses:
……包含若干個子類別的元素用圓括號中的子元素的名字來定義。

<!ELEMENT element-name 
(child-element-name)>
or
<!ELEMENT element-name
(child-element-name,child-element-name,.....)>
example:
<!ELEMENT note (to,from,heading,body)>

When children are declared in a sequence separated by commas, the children must appear in the same sequence in the document. In a full declaration, the children must also be declared, and the children can also have children. The full declaration of the "note" element will be:
當子元素被逗號依次隔開聲明時,子元素必須在文件中以相同的順序出現(xiàn)。在一個完整的聲明中,子元素必須也被聲明,同時子元素也能有子元素。"note"元素的完整聲明是:

<!ELEMENT note (to,from,heading,body)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT from (#PCDATA)>
<!ELEMENT heading (#PCDATA)>
<!ELEMENT body (#PCDATA)>


Declaring only one occurrence of the same element 
給相同的元素聲明一個發(fā)生事件

<!ELEMENT element-name (child-name)>
example:
<!ELEMENT note (message)>

The example declaration above declares that the child element message must occur once, and only once inside the "note" element.
上面的實例聲明了子元素信息必須出現(xiàn)一次,并且在"note"元素中只出現(xiàn)一次。


Declaring minimum one occurrence of the same element
聲明相同元素的最小發(fā)生事件

<!ELEMENT element-name (child-name+)>
example:
<!ELEMENT note (message+)>

The + sign in the example above declares that the child element message must occur one or more times inside the "note" element.
上面實例中的加號聲明了子元素信息必須在"note"元素中出現(xiàn)一次或幾次。


Declaring zero or more occurrences of the same element 
聲明0或更多相同元素的出現(xiàn)事件

<!ELEMENT element-name (child-name*)>
example:
<!ELEMENT note (message*)>

The * sign in the example above declares that the child element message can occur zero or more times inside the "note" element.
在上面實例中的*號聲明了子元素信息可以在"note"元素中出現(xiàn)0或更多次數(shù)。


Declaring zero or one occurrences of the same element 
聲明0或1次相同元素的發(fā)生事件

<!ELEMENT element-name (child-name?)>
example:
<!ELEMENT note (message?)>

The ? sign in the example above declares that the child element message can occur zero or one times inside the "note" element.
在上面的實例中的?號聲明了子元素信息可以在"note"元素中出現(xiàn)0或1次。


Declaring either/or content
聲明either/or內(nèi)容

example:
<!ELEMENT note (to,from,header,(message|body))>

The example above declares that the "note" element must contain a "to" element, a "from" element, a "header" element, and either a "message" or a "body" element.
上面的事例聲明了"note"元素必須包含一個”TO”元素、一個“form”元素、一個“header”元素以及“message”或“body”元素。


Declaring mixed content
聲明混合內(nèi)容

example:
<!ELEMENT note (#PCDATA|to|from|header|message)*>
The example above declares that the "note" element can contain zero or more occurrences of parsed character, "to", "from", "header", or "message" elements.
上面的實例聲明了"note"元素可以包含0或更多分列字符(“or”、“form”、“header”或“message”元素)。




DTD - 屬性(四)
w3pop.com / 2006-09-21

DTD - 元素
DTD - 實體

In a DTD, Attributes are declared with an ATTLIST declaration.
在DTD中,屬性是通過ATTLIST聲明來聲明的。


Declaring Attributes
聲明屬性

An attribute declaration has the following syntax:
屬性聲明的語法如下:

<!ATTLIST element-name attribute-name 
attribute-type default-value>
example:
DTD example:
<!ATTLIST payment type CDATA "check">

XML example:
<payment type="check" />

The attribute-type can have the following values:
屬性類型含有以下值:

Value
Explanation
解釋

CDATA

The value is character data
字符數(shù)據(jù)值

(en1|en2|..)

The value must be one from an enumerated list
必須是來自列表中的一個值

ID

The value is a unique id
唯一獨立的id值

IDREF

The value is the id of another element
其它元素的id值

IDREFS

The value is a list of other ids
其它id的列表值

NMTOKEN

The value is a valid XML name
其值為一個有效的XML名稱

NMTOKENS

The value is a list of valid XML names
其值為一組有效的XML名稱列表值

ENTITY

The value is an entity
其值為一個實體

ENTITIES

The value is a list of entities
其值為一組實體的列表

NOTATION

The value is a name of a notation
其值為一個符號的名稱

xml:

The value is a predefined xml value
預定的XML值

The default-value can have the following values:
省略補充含有以下值:

Value
Explanation
解釋

value

The default value of the attribute
屬性默認值

#REQUIRED

The attribute value must be included in the element
包含于元素內(nèi)的屬性值

#IMPLIED

The attribute does not have to be included
可包含也可不包含于元素內(nèi)

#FIXED value

The attribute value is fixed
固定的屬性值



Specifying a Default attribute value
指定一個默認的屬性值

DTD:
<!ELEMENT square EMPTY>

<!ATTLIST square width CDATA "0">
Valid XML:
<square width="100" />

In the example above, the "square" element is defined to be an empty element with a "width" attribute of  type CDATA. If no width is specified, it has a default value of 0.
在上面的例子中,"square"元素定義為含有CDATA類型的"width"屬性的空元素。如果沒有指定width值,那它默認為0。


#IMPLIED

Syntax
語法

<!ATTLIST element-name attribute-name 
attribute-type #IMPLIED>

Example
例子

DTD:
<!ATTLIST contact fax CDATA #IMPLIED>
Valid XML:
<contact fax="555-667788" />
Valid XML:
<contact />

Use the #IMPLIED keyword if you don‘t want to force the author to include an attribute, and you don‘t have an option for a default value.
如果你不想讓author元素包含一個屬性值或?qū)δJ值不具備選擇權(quán),那么你不妨使用#IMPLIED關(guān)鍵字。


#REQUIRED

Syntax
語法

<!ATTLIST element-name attribute_name 
attribute-type #REQUIRED>

Example
例子

DTD:
<!ATTLIST person number CDATA #REQUIRED>
Valid XML:
<person number="5677" />
Invalid XML:

<person />

Use the #REQUIRED keyword if you don‘t have an option for a default value, but still want to force the attribute to be present.
如果你對默認值不具備選擇權(quán)卻想?yún)s有想讓屬性值存在,那么你不妨使用#REQUIRED關(guān)鍵字。


#FIXED

Syntax
語法

<!ATTLIST element-name attribute-name 
attribute-type #FIXED "value">

Example
例子

DTD:
<!ATTLIST sender company CDATA #FIXED "Microsoft">
Valid XML:
<sender company="Microsoft" />
Invalid XML:
<sender company="W3Schools" />

Use the #FIXED keyword when you want an attribute to have a fixed value without allowing the author to change it. If an author includes another value, the XML parser will return an error.
當你希望屬性是一個固定值且不希望讓author元素去改變它,我們建議你使用#FIXED關(guān)鍵字。如果author包含另外一個值,XML剖析器將會提示錯誤。


Enumerated attribute values
列舉屬性值方法Enumerated attribute values:

Syntax:
<!ATTLIST element-name
attribute-name (en1|en2|..) default-value>
DTD example:
<!ATTLIST payment type (check|cash) "cash">

XML example:
<payment type="check" />
or
<payment type="cash" />
Use enumerated attribute values when you want the attribute values to be one of a fixed set of legal values.
當你希望得到一個固定合法的屬性值時,請使用列舉屬性值(Enumerated attribute values)的方法。


DTD - 實體(五)
w3pop.com / 2006-09-21

DTD - 屬性
DTD 校驗

Entities are variables used to define shortcuts to common text.
實體是用于定義普通文本快捷方式的變量。

- Entity references are references to entities.
實體參數(shù)就是反映實體特征的參數(shù)。
- Entities can be declared internal, or external
實體可以聲明為內(nèi)部實體或外部實體。


Internal Entity Declaration
內(nèi)部實體聲明

Syntax: 
<!ENTITY entity-name "entity-value">

DTD Example:
<!ENTITY writer "Donald Duck.">
<!ENTITY copyright "Copyright W3Schools.">
XML example:
<author>&writer;&copyright;</author>
 

External Entity Declaration
外部實體聲明

Syntax: 
<!ENTITY entity-name SYSTEM "URI/URL">

DTD Example:
<!ENTITY writer    
SYSTEM "http://www.w3schools.com/dtd/entities.dtd">
<!ENTITY copyright
SYSTEM "http://www.w3schools.com/dtd/entities.dtd">
XML example:
<author>&writer;&copyright;</author>


DTD 校驗(六)
w3pop.com / 2006-09-21

DTD - 實體
DTD - 來自網(wǎng)絡(luò)的舉例

Internet Explorer 5.0 can validate your XML against a DTD.
IE5.0可以通過DTD檢驗你的XML。


Validating with the XML Parser
用XML剖析器確認

If you try to open an XML document, the XML Parser might generate an error. By accessing the parseError object, the exact error code, the error text, and even the line that caused the error can be retrieved:
如果你想打開一個XML文件,那XML剖析器會產(chǎn)生錯誤。通過訪問分析錯誤目標,精確的錯誤代碼、錯誤文本以及引起錯誤的線路都能找到。

Note: The load( ) method is used for files, while the loadXML( ) method is used for strings.
注意:The load( ) method是用于文件的,而the loadXML( ) method是用于字符串的。

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.validateOnParse="true"

xmlDoc.load("note_dtd_error.xml")

document.write("<br>Error Code: ")
document.write(xmlDoc.parseError.errorCode)
document.write("<br>Error Reason: ")
document.write(xmlDoc.parseError.reason)
document.write("<br>Error Line: ")
document.write(xmlDoc.parseError.line)

你可以自己嘗試一下 或 查看這個XML文件


Turning Validation off
關(guān)閉確認

Validation can be turned off by setting the XML parser‘s validateOnParse="false".
確認可以通過XML解析器的validateOnParse="false"來關(guān)閉。

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.validateOnParse="false"

xmlDoc.load("note_dtd_error.xml")

document.write("<br>Error Code: ")
document.write(xmlDoc.parseError.errorCode)
document.write("<br>Error Reason: ")
document.write(xmlDoc.parseError.reason)
document.write("<br>Error Line: ")
document.write(xmlDoc.parseError.line)

自己嘗試一下吧!


A general XML Validator
XML通用的確認方法

To help you validate your xml files, we have created this link so that you can Validate any XML file.
如想確認你的XML文件,我們創(chuàng)建了一個可以快速訪問Validate any XML file(確認XML文件)的鏈接


The parseError Object
分析錯誤對象(Object)

You can read more about the parseError object in our XML DOM tutorial.
如想了解更多關(guān)于parseError 對象的情況,請訪問我們DOM tutorial (DOM教程)。



DTD - 來自網(wǎng)絡(luò)的舉例(七)
w3pop.com / 2006-09-21

DTD 校驗
DTD 摘要

TV Schedule DTD
DTD電視節(jié)目

By David Moisan. Copied from his Web: http://www.davidmoisan.org/
摘自網(wǎng)絡(luò) http://www.davidmoisan.org/

<!DOCTYPE TVSCHEDULE [
<!ELEMENT TVSCHEDULE (CHANNEL+)>
<!ELEMENT CHANNEL (BANNER,DAY+)>
<!ELEMENT BANNER (#PCDATA)>
<!ELEMENT DAY (DATE,(HOLIDAY|PROGRAMSLOT+)+)>
<!ELEMENT HOLIDAY (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>

<!ELEMENT PROGRAMSLOT (TIME,TITLE,DESCRIPTION?)>
<!ELEMENT TIME (#PCDATA)>
<!ELEMENT TITLE (#PCDATA)> 
<!ELEMENT DESCRIPTION (#PCDATA)>

<!ATTLIST TVSCHEDULE NAME CDATA #REQUIRED>
<!ATTLIST CHANNEL CHAN CDATA #REQUIRED>
<!ATTLIST PROGRAMSLOT VTR CDATA #IMPLIED>
<!ATTLIST TITLE RATING CDATA #IMPLIED>

<!ATTLIST TITLE LANGUAGE CDATA #IMPLIED>

]>
 

Newspaper Article DTD
DTD報紙文摘

Copied from http://www.vervet.com/ 
Copied from (摘自)http://www.vervet.com/

<!DOCTYPE NEWSPAPER [ 
<!ELEMENT NEWSPAPER (ARTICLE+)>
<!ELEMENT ARTICLE (HEADLINE,BYLINE,LEAD,BODY,NOTES)>
<!ELEMENT HEADLINE (#PCDATA)>
<!ELEMENT BYLINE (#PCDATA)>

<!ELEMENT LEAD (#PCDATA)>
<!ELEMENT BODY (#PCDATA)>
<!ELEMENT NOTES (#PCDATA)> 
<!ATTLIST ARTICLE AUTHOR CDATA #REQUIRED>
<!ATTLIST ARTICLE EDITOR CDATA #IMPLIED>
<!ATTLIST ARTICLE DATE CDATA #IMPLIED>
<!ATTLIST ARTICLE EDITION CDATA #IMPLIED>
<!ENTITY NEWSPAPER "Vervet Logic Times">

<!ENTITY PUBLISHER "Vervet Logic Press">
<!ENTITY COPYRIGHT "Copyright 1998 Vervet Logic Press">
]>
 

Product Catalog DTD
DTD產(chǎn)品目錄

Copied from http://www.vervet.com/ 
Copied from (摘自)http://www.vervet.com/

<!DOCTYPE CATALOG [
<!ENTITY AUTHOR "John Doe">

<!ENTITY COMPANY "JD Power Tools, Inc.">
<!ENTITY EMAIL "jd@jd-tools.com">

<!ELEMENT CATALOG (PRODUCT+)>

<!ELEMENT PRODUCT
(SPECIFICATIONS+,OPTIONS?,PRICE+,NOTES?)>
<!ATTLIST PRODUCT
NAME CDATA #IMPLIED
CATEGORY (HandTool|Table|Shop-Professional) "HandTool"
PARTNUM CDATA #IMPLIED
PLANT (Pittsburgh|Milwaukee|Chicago) "Chicago"

INVENTORY (InStock|Backordered|Discontinued) "InStock">

<!ELEMENT SPECIFICATIONS (#PCDATA)>
<!ATTLIST SPECIFICATIONS
WEIGHT CDATA #IMPLIED
POWER CDATA #IMPLIED>

<!ELEMENT OPTIONS (#PCDATA)>
<!ATTLIST OPTIONS
FINISH (Metal|Polished|Matte) "Matte"
ADAPTER (Included|Optional|NotApplicable) "Included"

CASE (HardShell|Soft|NotApplicable) "HardShell">

<!ELEMENT PRICE (#PCDATA)>
<!ATTLIST PRICE
MSRP CDATA #IMPLIED
WHOLESALE CDATA #IMPLIED
STREET CDATA #IMPLIED
SHIPPING CDATA #IMPLIED>

<!ELEMENT NOTES (#PCDATA)>

]>
 

DTD 摘要(八)
w3pop.com / 2006-09-21

DTD - 來自網(wǎng)絡(luò)的舉例

DTD Summary
DTD概要

This tutorial has taught you how to describe the structure of an XML document.
這份教程是說明XML文件結(jié)構(gòu)的

You have learned how to use a DTD to define the legal elements of an XML document, and how the DTD can be declared inside your XML document, or as an external reference.
你已經(jīng)知道了如何使用DTD來定義XML文件中的合法元素,以及如何將DTD從你的XML文件中或?qū)⑵渥鳛橥獠繀?shù)來聲明。

You have learned how to declare the legal elements, attributes, entities, and CDATA sections for XML documents.
你已經(jīng)知道了如何來聲明合法元素,屬性,實體以及XML文件的CDATA部分。

You have also seen how to validate an XML document against a DTD.
你也知道了如何通過DTD來驗證XML文件。


Now You Know DTD, What‘s Next?
現(xiàn)在你知道了DTD,那接下來該如何做呢?

The next step is to learn about XML Schema.
下一步是了解XML計劃。

XML Schema is used to define the legal elements of an XML document, just like a DTD. We think that very soon XML Schemas will be used in most Web applications as a replacement for DTDs.
XML計劃是用于定義XML文件中像DTD的合法元素的。我們來想一想不久XML計劃將會用于更多諸如代替DTD的網(wǎng)絡(luò)應用軟件。

XML Schema is an XML-based alternative to DTD.
XML 計劃對于DTD來說是一種以XML為基礎(chǔ)的可供選擇的辦法。

Unlike DTD, XML Schemas has support for data types and namespaces.
不像DTD,XML計劃支持數(shù)據(jù)類型和命名空間。

If you want to learn more about XML Schema, please visit our XML Schema tutorial.
如果你想了解更多XML計劃,請訪問我們的XML Schema tutorial. (XML計劃教程)。

網(wǎng)址:http://www.w3pop.com
本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
xml的DTD元素屬性的定義格式
XML認證教程,第 2 部分: Dtd
XML輕松學習手冊(4)XML語法
XML文件格式語法及DTD
DTD語法概述
DTD(百科)
更多類似文章 >>
生活服務
分享 收藏 導長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服