1.XSLT concept 1.1 What is XSLT 1.2 Why use XSLT 1.3 XSLT history 1.4 What is XPath 1.5 XSLT and CSS comparison 1.6 XSLT and IE5 1.xslt concept We first clarify a concept, everyone may hear XSL (EXTENSIBLE STYLESHEET LANGUAGE), XSL and XSLT we say here is the same, and according to W3C standards, XSLT's statement is more strict, so we will unify the XSLT in the article. The specific relationship between them will be described below. 1.1 What is the English standard name of XSLTXSLT EXTENSIBLE STYLESHEET LANGUAGE TRANSFORMATION. According to the W3C specification manual (http://www.w3.org/tr/xslt), the earliest design of XSLT is to help the XML document (Document) to convert to other documents. However, with the development, XSLT is not only used to convert XML to HTML or other text formats, and more comprehensive definitions should be: XSLT is a language for converting the XML document structure. 1.2 Why do we already know with XSLT, XML is a simple and standard approach to exchange raw data between computer programs. Its success is not that it is easily written and read, more importantly, it fundamentally solves information exchange between the application system. Because XML meets two basic needs: (1). Separate data and expression. Information on weather forecasts can be displayed on different devices, television, mobile phones or others. (2). Transfer data between different applications. E-commerce data exchange has increasing the need to make this demand increasingly urgent. In order to make the data easy to understand, we need to display the information or print out, such as turning data into an HTML file, a PDF file, even a sound; also, in order to make data suitable for different applications, we must There is an ability to convert a data format to another. For example, the demand format may be a text file, a SQL statement, an HTTP information, a certain order of data calls, etc. And XSLT is the language we used to implement this conversion function. Convert XML to HTML, which is currently the most important function of XSLT.
1.3 XSLT history Thought many other XML family members, XSLT drafted and developed by W3C. Its main development has been as follows:. Proposed by James CLARK in 1995; officially proposal in August 1997 is XSL;. In May 1998, the demand summary was completed by Norman Walsh; on August 18, 1998, issued; .1999 The XSL 1.0 recommended version was officially released on November 16. At present, XSLT is still in rapid development, and the draft XSLT1.1 can be seen on the W3C website (http://www.w3.org/tr/xslt11). 1.4 What is XPathXPath is an important part of XSLT, and we will explain its detailed grammar in Chapter 4. So what is XPATH? Let's take a look at the "family" relationship of the XSL series. As shown below: XSL is divided into two processes in the conversion XML document, the first conversion document structure; secondly format the documentation. These two steps can be separated and processed separately, so XSL gradually split into XSLT (Structure Translation) and XSL-FO (Formatting Objects) in the development process, and XSL-FO's role Similar to the role of CSS in HTML. And we focus on discussing the first step in the first step, that is, XSLT. In addition, we already know that XML is a complete tree structure document when learning XML. In the conversion XML document, you may need to process some (node) data, so how to find and locate the information in the XML document, XPath is a language specifically used to find information in the XML document. XPath is affiliated with XSLT, so we usually mix the XSLT syntax and XPath syntax. Using a more good understanding: If the XML document is viewed as a database, XPath is a SQL query language; if the XML document is viewed as a DOS directory structure, XPath is a collection of CD, DIR and other directory operation commands.