zoukankan      html  css  js  c++  java
  • The Difference Between CSS and XSLT

    The Difference Between CSS and XSLT
    They're Both Style Sheets, Right?

    By Jennifer Kyrnin

    http://webdesign.about.com/library/weekly/aa101901a.htm

    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.

  • 相关阅读:
    为什么你不是优秀的人?是这个原因么?
    我们应选择怎样的IT公司
    如何获得加薪
    隐藏为了适时出现
    如何通过一个问题,完成最成功的技术面试
    阿里负责人揭秘面试潜规则
    应聘互联网公司的简历应该是怎么样的?
    linq 图解
    Lambda表达式的前世今生
    Lambda应用设计模式
  • 原文地址:https://www.cnblogs.com/smwikipedia/p/1558216.html
Copyright © 2011-2022 走看看