Hello,
I am a relatively new PHP programmer and I am familiar with programming
logic of web sites. I now want to get a good grasp of content and
presentation. I am trying to figure out if I should focus on XML and XSL
or CSS.
XSL and CSS are very different. However they do overlap in some area,
especially where presentation of information is concenered. Mozilla
and (I think) IE are capable of presenting XML data by applying a CSS
to it. This should be used (or maybe preffered) in displaying simple
XML data. Take a look at
http://www.xml-dev.com/blog/#18 for more info
and sample CSS to display XML in the browser. There is also a tutorial
at the above link.
However XSL should be used when a large amount of XML data needs to
transformed and displayed. So to simplify:
XML + XSL => XHTML
XHTML + CSS => presentable (human readable) content.
I this case the XSL is used to transform the XML content to XHTML. and
a CSS is used to make it presentable.
Here are some examples (
http://www.xml-dev.com/blog/#88 ) of how
Apache's Cocoon (XML publishing framework) is being used to transform
XML to XHTML and then a CSS being applied to present the content.
So to summarize:
It really depends on your application and your audience who will be
using the application. For cross browser compatibility I would suggest
using XSLT to first convert XML to XHTML and then applying CSS.
Some benefits of CSS:
1) CSS can help multi-platform use.
2) Done right, CSS is a great way to separate content from
presentation.
3) Printing: Another Advantage of CSS
In Peace,
Saqib Ali
http://validate.sf.net