Advanced Web Technologies

Blog posts as part of the BSc Internet Application Development programme to discuss my experience while working on the tasks that will be given during the Advanced Web Technologies module.

Both CSS and XSL both refers to stylesheets. CSS can be used to style bith the HTML and XML documents, while XSL is a transformation language used to transform only XML documents.[1]

In order to choose which one to use, W3C recommends the following rule; "Use CSS when you can, use XSL when you must".[2]

The following are the advantages of CSS:[3]
  • The change to the style of the document is easier when using CSS, that is, making changes to only one CSS file instead of going through many HTML files;
  • The CSS file will only be downloaded once, and therefore the requirement of the bandwidth will be reduced;
  • Layout will be consistent in the entire website;
  • It is easier for visitors who would like to view only the web page content, since it separates style from content.
On the other hand CSS also have some disadvantages:[4]
  • CSS layout is rendered differently and therefore CSS will not work consistently when using different browsers;
  • CSS does not have any variables;
  • CSS is a style language rather than a layout language and therefore poor layout controls for flexible layouts.
XSL has the following advantages on CSS:[5]
  • XSLT and XSL-FO are combined and therefore a much more complex and powerful styling language is created;
  • XSLT is turing complete;
  • XSLT is capable of creating content and capable of generating multiple contents.
A disadvantage of XSL is that:
  • XSL-FO is complex and therefore it is very difficult to implement an FO processor.

Sources:

[1] http://www.w3.org/Style/
[2] http://www.w3.org/Style/CSS-vs-XSL
[3] http://www.vordweb.co.uk/css/advantages-of-css.htm
[4]http://www.articlesbase.com/web-design-articles/advantages-and-disadvantages-of-using-css-833019.html
[5] http://www.pubarticles.com/article-the-difference-between-css-and-xsl-1240385227.html

0 comments:

Post a Comment