When learning XML, one question you might have is: What is the relationship between XSL, XSLT and XSL-FO? Understanding the nature and syntax of XML is relatively easy. However, comprehending how to render the data contained in an XML document is not. In other words, how does the inventory information created in the XML file end up on a web page? The first step in learning to format XML data is decide what style sheet to use. There are a variety of choices available. To choose the right one, you need to understand the relationship between XSL, XSLT and XSL-FO.
What is XSL?
XSL is the catchall term for some languages used in XML formatting. It is the family name that encompasses style sheets for XML. Included under the umbrella of XSL are XSL Transformations (XSLT), XML Path Language (XPath) and XSL Formatting Objects (XSL-FO). When someone uses the term XSL, they might be referring to any style sheet attached to an XML file to specify rendering and validation rules. A style sheet describes how a document will look on the screen or in print. Without a style sheet, the data contained in an XML file has no meaning.
What is XSLT?
XSLT is the acronym for XSL Transformations. The job of XSLT is to transform data from an XML file into another format, such as HTML or XHTML. An XSLT style sheet looks at the data contained in the core XML file to make sure it is well formed and valid. It will then create an output stream that incorporates formatting instructions provided. The output stream will be written in a language, such as XHTML. Essentially, XSLT is one way to take the information stored in an XML file and put it on the screen via a markup language. XSLT is a member of the XSL family.
What is XSL-FO?
XSL-FO is another language for formatting XML data. Extensible Stylesheet Language Formatting Objects (XSL-FO) focuses on style that works for both screen and print, such as PDF files. There is no difference between XSL-FO and XSL. The World Wide Web Consortium (WC3) simply expanded on the original theories of XSL to create XSL-FO. As the technology for internet publishing grew, XML had to grow with it. That led to the development of XSL-FO. This method of formatting allows you to create pages that look fantastic on any screen and that will print neatly. XSL-FO is also part of the XSL family, but has replaced what designers previously considered an XSL file. XSL-FO is the same thing as the XSL of the past and often the two terms are interchangeable.
