XML QL Query Language and Its Implementation - 1

zhaozj2021-02-16  67

【Abstract】 This article introduces the difference and contact of XML and HTML, which is introduced to the current comparative XML-QL query language and its implementation channels, and discussed by examples. XML-QL is a very powerful functionality that is currently more efficient in Query XML documents.

【Key words】 HTML, XML, XML-QL, inquiry language

1. Comparison of HTML and XML

(1) Development of HTML and XML

With the development of network technology, the organization and management of various forms of mass data is the content of people have been studying. The display and format of the text content is managed by marking, which is an important way to organize information in the web environment. There are three commonly used markups: SGML (Standard Generalized Markup Language), a meta-language, can define numerous tags, Hypertext Markup Language, a subset of SGML, suitable for display, XML ( EXTENSIBLE MARKUP LANGUAGE), a subset of SGML, used to define data structures, suitable for large-scale data transmission in e-commerce.

As early as the Web is not invented, SGML already exists. As its name, SGML is a general language with a mark to describe document data, which contains a series of document type definitions (DTDs), defined in the DTD, and the syndrome of the tag is the syntax of SGML. of. SGML is very large, it is not easy to learn, it is not easy to use, and it is also very difficult to implement on your computer. In view of these factors, the Samples of the Web-European Nuclear Physics Research Center proposed HTML language based on the capacity of computer technology at that time (1989).

HTML only uses a small part of the SGML, such as HTML 3.2 defines 70 markers. In order to facilitate implementation on a computer, the tags specified by HTML are fixed, that is, the HTML syntax is not expandable, and it does not need to include DTD. HTML This fixed syntax makes it easy to use, and it is also very easy to develop HTML browsers on your computer. It is because of the simplicity of HTML, making web technology from the computer world to the whole society, going to thousands of households, and the development of the web is in the day.

As the web application is getting wider and in-depth, people gradually feel that HTML is not enough, HTML is too simple to prevent the form of complicated use of it. Although HTML has launched another new version, there is already a script, form, frame and other expressions, but always meets growing demand. On the other hand, the rapid development of computer technology in recent years has been able to achieve a web browser that is much more complex than the original invention created HTML, so developing a new web page language is both necessary and possible.

Some people recommend using SGML directly as a web language, which can solve the difficulties encountered by HTML. But SGML is too large, users are learning and useless, and not to say, it is very difficult to fully realize SGML browsers, so they will naturally think that only SGML's subset is used, so that new languages ​​are both convenient to use and easy implementation. It is in this situation, and the web standardization organization W3C recommends using a streamlined SGML version, XML is gone.

XML is a streamlined SGML that combines SGML's rich features with HTML's ease of use into web applications. XML retains the scalable features of SGML, which makes XML fundamentally different from HTML. XML is much more powerful than HTML, it is no longer a fixed tag, but allows the number of unlimited tags to describe the information in the document, allowing nested information structures. HTML is just a general method of web display data, while XML provides a general method for processing Web data. HTML focuses on the display format of the web page, while XML focuses on the content of the web page. The XML includes an extensible format language XSL (Extensible style language) and an Extensible Linking Language.

XSL is used to translate XML data into an HTML or other format. XSL provides a function of laminated page CSS to enable developers to construct a web page with an expression layer structure to be different from the data structure of XML. XSL can also construct a laminated page with HTML. XSL can explain the number of unlimited tags that make the web's layout colorful, such as dynamic text, hockey-style text. In addition, XSL also processes multi-country text, double-byte Chinese characters, and various processing of tables.

XLL is a link language of XML, which is similar to the link of HTML, but more powerful. XLL supports scalable links and multi-directional links. It breaks HTML only supports the simplest link restriction under the super text concept, which supports a domain name, two-way link, loop, multiple source collection links, etc. The XLL link is not subject to documentation, fully specified and managed by user requirements.

In order to make XML easy to learn, XML streamlines a large SGML is rare to use once. Just as there is only eight thousand in millions of Chinese characters, SGML commonly used parts only account for 20%, XML abandoned the uncommon part of SGML, so that it streamed 80%. In this way, XML's grammatical manual is only 30 pages, while SGML has 500 pages.

It is also considered in XML design, which is easy to use from two aspects: one side of the user writes the web page, and the designer is not difficult to implement XML browser.

In summary, XML uses a simple and flexible standard format, providing a web-based application with an effective means of describing data and exchange data. HTML describes a general method of displaying global data, while XML provides a general method for processing global data.

(2) Comparison of HTML and XML

By comparative analysis, HTML and XML have the disadvantage of being as follows.

Advantages of HTML:

1) There are fewer markers. All markers of HTML are not more than 100 together, and dozens of commonly used tags are also. Web programmers can use trip to dozens of words, so that HTML has been popular among the world.

2) The grammar is required to relax. The program statement is not sensitive to case, and the control mark is not necessarily paired. These features play a lot to HTML.

3) There are many applications related to HTML. There are many software, such as HOTDOG, FrontPage, HTML ABC, Dreamwaver, etc., can be easily generated by HTML code.

Insufficient HTML:

1) The determinism of the tag. The html language tag is fixed, so it is the same set of tags, whether it is the same set of tags, and the user has no way to design a special mark suitable for yourself.

2) HTML's focus is the style of displaying information. HTML is essentially a format display language. It doesn't matter to distinguish between page data and patterns, and this limitation is also an important reason for the emergence of XML markers.

3) Different versions of HTML markup language norms are not unified. The HTML markup language and browser have very close. The code written by HTML can only be seen by the translation and interpretation of the browser. In order for their respective benefits, the browser manufacturers creates a mark that meets their own interests, resulting in a chaotic situation in the HTML markup language. Many html text can only be displayed normally in a browser, and it is not normal to change a browser. The display or display result is garbled. For example, Microsoft develops can only be adapted to your browser if it is not shown in Netscape. The advantage of XML:

1) Data exchange between different data sources. The XML has a cross-platform characteristic that provides a public standard for data exchange between different data sources, a public interactive platform, one data source can be used to represent its data into an XML format can be further data Source effectively identify.

2) A variety of data display. HTML is a dedicated language that displays web data, and XML is a markup that represents stored and used to transmit data. The XML document does not decide the display style of the data, and the display portion is solved by other languages ​​(XSL and CSS). XML distinguishes the status display section of the information section of the information and the information of the information, we can add a variety of styles to the same data to get a variety of display effects.

3) Distributed processing of data. One advantage of the XML data model is that many loads that must be processed by the server are allocated to the client, thereby reducing the burden on the server, optimizing the performance of the server, and this is at all in the HTML markup language architecture Implemented.

4) Simple and easy to learn and powerful. The XML markup language inherits the characteristics of the HTML language simple and easy to learn, and features are very powerful. XML itself is a subset of SGML, is a SGML document dedicated to the Internet, so XML fully inherits the advantages of SGML, and overcomes the shortcomings of SGML. / sw / tools / xmlql /.

转载请注明原文地址:https://www.9cbs.com/read-21793.html

New Post(0)