Web Technologies - Old Questions

9.  How XSL is different from CSS? Explain.

5 marks | Asked in 2068

XSL and CSS are two different languages recommended by the World Wide Web Consortium (W3C). XSL is more powerful and complex than CSS. Some of the difference between CSS and XSL are listed below:

  • XSL uses the XML notation that is helpful in writing the codes and the tools are provided in greater extent, whereas CSS doesn’t use any of the XML notations but has its own. 
  • XSL is having the formatting object tree setup differently from the source tree; whereas CSS is having the source tree and the formatting object tree the same.
  • XSL can’t provide the inheritance of the source tree using the formatting properties, whereas CSS provides the inheritance of the formatting object that is related to the source tree.
  • XSL is not supported by many of the web browsers, whereas CSS can be read by modern web browsers.
  • XSL is used to refer to a family of languages used to transform and render XML documents. CSS is a style sheet language used for describing the presentation semantics (the look and formatting) of a document written in a markup language.
  • XSL is designed to meet the needs of more complex applications for richer style sheets, whereas CSS is highly effective and easy to learn for simple applications.
  • XSL supports decision structures and can calculate quantities or store values in variable, whereas CSS doesn't support decision structures and it cannot calculate quantities or store values in variables.