XSL(1)--XSLT & XPath (Overview)

 What is XSL

XSL stands for Extensible Stylesheet Language.
XSL was designed to style XML pages, while CSS was designed for styling HTML pages.
XSL consists of three languages:
  • XSLT: transforming XML document
  • XPath: navigating XML document
  • XSL-FO: formatting XML document
How does it work
  • The XML source document is parsed into an XML source tree
  • Use XPath to define templates that match parts of the source tree
  • Use XSLT to transform the matched parts and put the transformed information into a result tree
  • The result tree is output as a result document

XSLT

XSLT = XSL Transformations

xslt is used to transform an xml document into another xml document, or other type of document that can be recognied by a browser, like html and xhtml. Normally xslt does this by transforming each xml element into an (x)html element.

With xslt you can add/remove elements and attributes to or from the output file. You can also rearrange and sort elements, perform tests and make decisions about which elements to hide and display, and a lot more.

XPath

xslt uses xpath to find information in an xml document. Xpath is used to navigate through elements and attributes in xml document.

posted on 2008-09-22 14:26  *Sabrina*  阅读(150)  评论(0编辑  收藏  举报

导航