The difference between xml,dtd,xsd,xsl

Source: Internet
Author: User
Tags xml parser xsl


xml= Extensible Markup Language (extensible Markup Language).
Extensible Markup Language XML is a simple data storage language that describes data using a series of simple tags that are available


Convenient way to build, although XML occupies more space than binary data, but XML is extremely simple and easy to grasp and use


The simplicity of XML makes it easy to read and write data in any application, which makes XML quickly the only common language for data exchange, and XML is not a language attached to a particular browser


dtd= type definition (documnet)

A DTD is a set of syntax rules about tokens. It is part of the XML1.0 version specification, which is a validation mechanism for XML files, which is part of the XML file composition.
DTDs are an effective way to ensure that the XML document is well-formed by comparing XML documents and DTD files to see if the document conforms to the specification and whether the elements and labels are used correctly.



A DTD document contains the definition rules for elements, the rules for defining relationships between elements, the attributes that an element can use, and the entity or symbol rules that can be used.
But DTDs are written using non-XML syntax.
DTD is not extensible, namespaces are not supported, only very limited data types are available



xsd=xml structure definition (XML Schemas definition)
The XML schema language is also XSD. The XML Schema describes the structure of the XML document.



An XML document can be validated with a specified XML schema to check whether the XML document meets its requirements. The XML schema allows the document designer to specify the structure and content allowed by an XML document, and to check whether an XML document is valid. The XML schema itself is an XML document that conforms to the XML syntax structure. It can be parsed with a common XML parser.
An XML schema defines the elements that appear in the document, the attributes that appear in the document, the child elements, the number of child elements, the order of the child elements, whether the element is empty, the data type of the element and attribute, the default and fixed values of the element or attribute.
XSD is the reason for DTD substitution, one is that the future conditions can be expanded, two is richer and more useful than DTDs, three is written in XML, four is support data type, and five is support namespace.
The advantages of XML schema:
1) XML Schema XML-based, no specific syntax
2) XML can parse and process like other XML files
3) XML schema supports a range of data types (int, float, Boolean, date, etc.)
4) XML schema provides an extensible data model.
5) XML schema supports integrated namespaces
6) XML schema supports attribute groups.


xsl= Extensible Stylesheet Language (extensible Stylesheet Language)


XSL is to XML, just as CSS is to HTML. It refers to the Extensible Stylesheet Language (extensible Stylesheet Language). This is a language for rendering XML data in a readable format.


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.