XSL

(redirected from XSLT processor)

XSL

XSL

(eXtensible Stylesheet Language) A style sheet standard from the W3C that is used to convert an XML document into many formats for publishing and printing. XSL is similar to the Cascading Style Sheets (CSS) in HTML and is compatible with CSS2. An XML document is converted by an "XSLT Processor," also called an "XSLT Transformation Engine," into the new format based on three sets of XSL description languages, as follows:

#1 - XSL-FO - Convert to Page Formats
The XSL Formatting Objects (XSL-FO) language is used to apply page formatting to an XML document and produce an XSL-FO document. The resulting XSL-FO file, or simply "FO file," serves as a paginated master file for conversion to page-oriented formats such as PDF, PostScript, AFP or PCL. The conversion is handled by a third-party program such as XML Engine for Print (XEP) from RenderX (www.renderx.com) or Apache Formatting Objects Processor (http://xmlgraphics.apache.org/fop).

When a user selects a PDF document on a Web page, the file may actually reside in XSL-FO format and be rendered on the fly to PDF for that user in real time. The XSL-FO format was designed to outlive proprietary page description languages and is a good choice for archiving paginated documents.

#2 - XSLT - Convert to XML, HTML and Text
The XSL Transformation Language (XSLT) is used to convert an XML document into an HTML or text document or to another XML document with a different structure. The most common XSLT transformations are from XML to HTML for rendering in a Web browser. Unlike the paginated format of XSL-FO, HTML pages are structured as scrollable windows of infinite vertical length.

If the XSLT to transform XML to HTML is embedded in an XML document, the document can be converted to HTML on the fly for rendering, just as XSL-FO can be turned into PDF on the fly for downloading.

#3 - Xpath - Select and Calculate
The XML Path Language (Xpath) is used in conjunction with XSL-FO and XSLT to select elements within an XML document. Xpath can also be used to count items; for example, how many times a particular tag occurs in the document. See XQuery, XML and CSS.


XSLT Processing
For conversion, the XML document is parsed into a tree structure, and the XSLT Processor creates a new file based on the descriptions in the XSL-FO, XSLT and Xpath components. This illustration shows the ways XSL can be applied to the document and the common outputs.







XSL-FO to Print
RenderX's XML Engine for Print (XEP) converts XSL-FO documents to PDF, PostScript or IBM's AFP page formats. (Image courtesy of RenderX, www.renderx.com)
References in periodicals archive ?
XSLT processor traverses through nodes of a template after transferring control to it.
The processor was compared with Xalan-J XSLT processor on the set of 25 transformations and another test was carried on XMark Benchmarks.
com IDE Excellent Good Very good WYSIWYG Excellent No No TYPE OF VALIDATION (1) RT, W, OD RT, OD RT, OD ELEMENTS IN CONTEXT Excellent Very good Fair * TAGS-ON VIEW Very Good No No DRAG/DROP SIRUCTURE Very good Good Good * STRUCTURE/TREE VIEW Separate Separate Synchronized GRID VIEW Yes Yes Yes SOURCE-CODE VIEW Excellent Good Good TAG AUTO-COMPLETION Yes Yes Yes LINE INDENTING Very good Good Good XSLT PROCESSOR Yes Xalan, Saxon Yes XPATH/XQUERY Very good Excellent Excellent NATIVE XML DB No No Yes DITA SUPPORT Good No Good DOCBOOK No Yes No INSTALL BASE (EST.
Sequence instructions tells an XSLT processor what you want to have happen when the pattern is found in the source.
The resulting transform specification is quite flexible, allowing kinds of processing not possible, at least in the usual way, in the more formal language of the XSLT processor.
It tells the XSLT processor how to transf orm the source trees and how to produce the result tree" (p.