Question Locked

css

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
what is the difference between css and xsl

2 replies

by tony hopkinson

CSS is more of a macro.
In css you'd define a style say size 20, lime green and bold.
Then instead of adding all those modifiers where you wanted them, you put in the style name. Obviously then if someone decides luminous green is a bit overpowering, you can change it to glaring orange in one place. and you can use it across your site, saving you updating every page.

With XSL, you put some well formed xml in and it changes it to different xml, (it also outputs non xml such as csv if you want).

So xsl changes the content, css tells teh browser how the content should look.

For instance if you wanted the negative numbers in a column to display in red, with css you'd manually examine each one and change the colour, or write a program to do so.

XSL will do both jobs in one go. It really comes into it's own when you want to change the content though. Don't use it where css will do the job, it's much more complicated an it will only work on well formed documents.

This discussion is closed to new replies.