Concept
1.5 XSLT and CSS comparisons
CSS can also format XML documents, so why do you need XSLT when you have CSS? Because CSS is a good way to control the output of the style, such as color, font, size, etc., but it has serious limitations, is:
(1) CSS cannot reorder elements in a document;
(2) CSS can not judge and control which element is displayed, which is not displayed;
(3) CSS can not be statistical calculation of the data elements;
In other words, CSS is only suitable for the output of a more fixed final document. The advantages of CSS are simplicity, consuming less system resources; While XSLT is powerful, it consumes more memory because it is indexed to the XML tree.
Therefore, we often combine them, such as using XSLT to process documents on the server side, and using CSS to control the display at the client. can reduce response time.
1.6 XSLT and IE5
Shortly after the release of the XSLT draft, Microsoft provided a preview version of the XSL feature in IE4 to support XSLT when IE5.0 was released, but because IE5 was released earlier than the XSLT1.0 standard Time, IE5.0 features and XSLT supported in Xstl 1.0 slightly different. (hehe ~~xml Implementation of one of the main reasons is to solve the problem of HTML over-reliance on browsers, and now Microsoft wants to be unconventional? )。 Fortunately, the standards implemented in Microsoft's IE5.5 have been basically similar to the XSLT1.0 of the consortium. But the headache is that IE5.0 has released millions of sets, and the XSLT you use may well not be properly executed by the client's browser. XSLT 1.1 is still evolving, and the consortium and its organizations are also negotiating with Microsoft to achieve unification. Oh ~ ~ The story is far from over.
Note: The syntax mentioned in this article is based on the XSLT 1.0 standard and does not have any "dialect" from Microsoft.