One.
XSL entry
1.xsl --- xml style sheet
The HTML page uses a predetermined identity (tags), which means that all tags have a clear meaning, such as
is another line
is the title font. All browsers know how to resolve and display HTML web pages.
However, XML does not have a fixed logo, we can build our own identity, so the browser cannot automatically parse them, such as
can be understood as a table, or it is understood as a table. Due to the scalability of XML, we have no standard approach to display the XML document.
In order to control the display of XML documents, we need to create a mechanism, CSS is one of them, but XSL (Extensible Stylesheet Language) is a preferred style language that displays an XML document, which is more suitable than XML than CSS.
2.xsl --- Not just a style sheet
XSL consists of two parts:
First, transform the XML document; the other is formatting the XML document.
If you don't understand this, you can think that XSL is a language that can convert XML into HTML, a language that can be filtered and selected XML data, a language that format XML data. (, Such as using a red display negative.)
3.xsl - what it can do?
XSL can be used to define how the XML document is displayed, and the XML document can be converted into an HTML file identified by the browser. It is usually, XSL is to achieve this conversion by translating each XML element "translated" as an HTML element. .
XSL can add new elements to the output file, or move the element. XSL can also rearrange or index data, which can detect and determine which elements are displayed, how much is displayed.
4.XSL display in IE5
Note: In IE5.0, it is not fully compatible with the latest XSL standard released by the W3C organization. Because IE5.0 is finally released before the XSL standard finally. Microsoft has promised to correct in IE5.5.
Two .xsl conversion
1. Convert XML to HTML
How do XSL convert XML documents to HTML files? Let's take an example, below is part of the XML document: