The DOCTYPE field in XML is described in detail.

Source: Internet
Author: User
The DTD declaration always starts! DOCTYPE starts with a blank box followed by the name of the document root element. if it is an internal DTD, a blank box appears [], which is the content defined by the document type in brackets. for external DTD, it is divided into private DTD and public DTD. private DTD is represented by SYSTEM, followed by the external dtd url. the public dtd uses PUBLIC, followed by the dtd public name, followed by the dtd url. the DTD declaration always starts! DOCTYPE starts with a blank box followed by the name of the document root element. if it is an internal DTD, a blank box appears [], which is the content defined by the document type in brackets. for external DTD, it is divided into private DTD and public DTD. private DTD is represented by SYSTEM, followed by the external dtd url. the public dtd uses PUBLIC, followed by the dtd public name, followed by the dtd url.

Private DTD

 

Common DTD

 

Common DTD, in the format of "register // organization // type label // language ",

"Registration" indicates whether the organization is registered by the International Organization for Standardization (ISO). + indicates yes,-indicates no.

"Organization" is the name of the organization, such as W3C;

"Type" is generally DTD,

The "tag" specifies the description of the public text, that is, the unique descriptive name of the referenced public text, followed by the version number.

The last "language" is the ISO 639 language identifier of the DTD language. for example, EN indicates English and ZH indicates Chinese,

The following URL contains a complete list of ISO 639 language identifiers.

For example:

 

To! DOCTYPE starts,

Html is the name of the document root element,

PUBLIC indicates that it is a public dtd,

The name is followed by the DTD name. The name starting with-indicates that the non-ISO organization name is W3C, and the EN indicates that the DTD language is English,

The last is the dtd url.

Note: Although the document URL of the DTD can use relative or absolute URL, it is recommended to use absolute URL. for public DTD, if the interpreter can recognize its name, the DTD file on the URL is not viewed.

The preceding section details the DOCTYPE field in XML. For more information, see other related articles in the first PHP community!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.