1. Getting started with XSL
--- XML style sheet
HTML pages use pre-determined tags, which means that all tags have clear meanings, such as <p> starting with another line <h1> being the title font. All browsers know how to parse and display HTML pages.
However, XML does not have a fixed identity, and we can create the identity we need, so the browser cannot automatically parse them, for example, <table> can be understood as a table or a table. Due to the scalability of XML, we do not have a standard way to display XML documents.
In order to control the display of XML documents, it is necessary to establish a mechanism, and CSS is one of them. However, XSL (eXtensible Stylesheet Language) is the preferred style language for displaying XML documents, and it is more suitable for XML than CSS.
--- Not just a style sheet
XSL consists of two parts:
First, convert XML documents; second, format XML documents.
If you don't understand this, think about it this way: XSL is a language that can convert XML into HTML, a language that can filter and select XML data, and a language that can format XML data. (For example, use red to display negative numbers.)
--- What can it do?
XSL can be used to define how XML documents are displayed, and XML documents can be converted into HTML files that can be recognized by the browser. Usually, XSL implements this transformation by "translating" each XML element into an HTML element.
XSL can add new elements to the output file or move elements. XSL can also rearrange or index data, which can detect and determine which elements are displayed and how many are displayed.
Display in IE5
Note: IE5.0 is not fully compatible with the latest XSL standards released by W3C organizations. Because IE5.0 was released before the finalization of the XSL standard. Microsoft has promised a correction in IE5.5.
--- XML style sheet
HTML pages use pre-determined tags, which means that all tags have clear meanings, such as <p> starting with another line <h1> being the title font. All browsers know how to parse and display HTML pages.
However, XML does not have a fixed identity, and we can create the identity we need, so the browser cannot automatically parse them, for example, <table> can be understood as a table or a table. Due to the scalability of XML, we do not have a standard way to display XML documents.
In order to control the display of XML documents, it is necessary to establish a mechanism, and CSS is one of them. However, XSL (eXtensible Stylesheet Language) is the preferred style language for displaying XML documents, and it is more suitable for XML than CSS.
--- Not just a style sheet
XSL consists of two parts:
First, convert XML documents; second, format XML documents.
If you don't understand this, think about it this way: XSL is a language that can convert XML into HTML, a language that can filter and select XML data, and a language that can format XML data. (For example, use red to display negative numbers.)
--- What can it do?
XSL can be used to define how XML documents are displayed, and XML documents can be converted into HTML files that can be recognized by the browser. Usually, XSL implements this transformation by "translating" each XML element into an HTML element.
XSL can add new elements to the output file or move elements. XSL can also rearrange or index data, which can detect and determine which elements are displayed and how many are displayed.
Display in IE5
Note: IE5.0 is not fully compatible with the latest XSL standards released by W3C organizations. Because IE5.0 was released before the finalization of the XSL standard. Microsoft has promised a correction in IE5.5.