Custom schema

Disclaimer: if reproduced - please add 457 556 886 micro letter informed at all can share knowledge of https://blog.csdn.net/wolf_love666/article/details/91493733

1, the difference between XML / DTD / XSD / XSL format

XML = Extensible Markup Language (eXtensible Markup Language).
Extensible Markup Language XML data store is a simple language, using a series of simple description tag data, and these markers are available
and convenient way to build, although the ratio of the space occupied by XML binary data takes up more space, but XML is extremely simple and easy to learn and use
simple XML makes it easy to read and write data in any application, which makes XML will soon become the only common language for data exchange, XML is not a dependent browser-specific language

Type definition DTD = (Documnet the Type Definition)
the DTD is a set of grammatical rules governing the tag. It is XML1.0 version of the specification was part of a verification mechanism for XML documents, XML files belonging to a part.
DTD is an XML document format effective way to ensure the right to be the document for compliance by comparing XML documents and DTD files point of view, the use of elements and labels are correct.
Document contains a DTD: element defining rules, defining rules the relationship between elements, attributes, elements can be used, entity or symbolic rules can be used.
But DTD is written using non-XML syntax
DTD can not be extended, it does not support namespaces, provide only very limited data types

XSD = XML structure definition (XML Schemas Definition)
XML Schema language is the XSD. XML Schema describes the structure of XML documents.
You can use a specific XML Schema to validate an XML document to check the XML document meets their requirements. Document designer can specify an XML document structure and content allowed by XML Schema, and shall check whether an XML document is valid. XML Schema is itself an XML document that conforms to XML syntax structure. With generic XML parser can parse it.
Elements appear in the document, the number of attributes appear in this document, child elements, sub-elements, the order of child elements, whether the element is empty, the default and fixed elements and attributes of data types, elements or attributes: a Schema defines XML value.
XSD is the reason DTD replacement, first according to the conditions of the future scalability, and second, and more powerful than DTD rich, three are written in XML, support data types, five support namespaces.
XML Schema advantages:

  1. XML Schema-based XML, there is no specific syntax
  2. XML can be as parse and process XML file like any other
  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 support integrated namespace
  6. XML Schema support property group.

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

Guess you like

Origin blog.csdn.net/wolf_love666/article/details/91493733