Web Design Forum: TUTORIAL: The Difference Between CSS and XSLT - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

TUTORIAL: The Difference Between CSS and XSLT Rate Topic: ****- 1 Votes

#1 User is offline   Simanto 

  • Forum Newcomer
  • Pip
  • Group: Banned
  • Posts: 51
  • Joined: 12-May 09
  • Reputation: 2
  • Location:Asia
  • Experience:Intermediate
  • Area of Expertise:Web Developer

  Posted 13 May 2009 - 07:29 AM

They're Both Style Sheets, Right?

Cascading Style Sheets or CSS were developed a few years ago to define the look and feel of markup languages. Extensible Style Sheet Language for Transformations or XSLT were created to transform documents. They are both style sheets, but they serve vastly different purposes.

What CSS Can Do

* Modify the font size, color, family, and style of text in markup
* Define the location and size of an element
* Change the background image and color of elements
* Create a new look and feel for markup pages to display on the Web

What CSS Cannot Do

* Change the order of elements in a document
* Make computations based on the content of the document
* Add content to the document
* Combine multiple documents into one

XSLT is a powerful language for transforming documents. It was created to allow developers the ability to create data and then transform it to various different formats. It is meant to keep the distinction between content and design separate.

What XSLT Can Do

* convert data in a standard XML format to SQL statements, tab-delimited text files, or other database formats for data sharing
* transform XSLT style sheets into new style sheets
* turn Web pages (written in XHTML) to VoiceML or XHTML Basic for handheld devices
* add CSS style sheets to XML documents for view in a browser

If all you're looking for is a style sheet to manipulate the way your content looks in a document, then you should use CSS. But if you're looking to actually transform one document into another, then XSLT is your tool.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users