Xml - Extensible Stylesheet Language (XSL)

1 - About

XSL is a language for formatting XML data for output to:

  • screen,
  • paper
  • or other media

Xls was started as an XML-based Stylesheet Language but is more than a simply Style Sheet Language with its three components.

  • CSS = Style Sheets for HTML
  • XSL = Style Sheets for XML = often XSLT

3 - Component

The Extensible Stylesheet Language (XSL) has three major subcomponents:

3.1 - XSL-FO

The Formatting Objects standard. By far the largest subcomponent, this standard gives mechanisms for describing font sizes, page layouts, and other aspects of object rendering.

XSL-FO documents are XML files with output information and one of the following extension:

  • .fo
  • .fob
  • .xml (to get xml syntax in editor)

3.2 - XSLT

XSLT is the transformation language, which lets you define a transformation from XML into some other format. For example, you might use XSLT to produce HTML or a different XML structure. You could even use it to produce plain text or to put the information in some other document format.

3.3 - XPath

At bottom, XSLT is a language that lets you specify what sorts of things to do when a particular element is encountered. But to write a program for different parts of an XML data structure, you need to specify the part of the structure you are talking about at any given time. XPath is that specification language. It is an addressing mechanism that lets you specify a path to an element so that, for example, <article><title> can be distinguished from <person><title>. In that way, you can describe different kinds of translations for the different <title> elements.

markup/xml/xsl.txt ยท Last modified: 2017/01/20 20:33 by gerardnico