Personal notes on software development.
For Java technologies check my dedicated site

Pages

XSL

Documentation and tutorials


What is XSL?

  • XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents.
  • XSLT stands for XSL Transformations. You can use XSLT to transform XML documents into other formats, like XHTML or other XML documents.
XSL is more than a Style Sheet Language, XSL consists of three parts:
  • XSLT - a language for transforming XML documents (so, XSLT is just a part of XSL). XSLT is a language for transforming XML documents into XHTML documents or to other XML documents.
  • XPath - a language for navigating in XML documents. XPath is a language for navigating in XML documents.
  • XSL-FO - a language for formatting XML documents

What is XSLT?

  • XSLT stands for XSL Transformations
  • XSLT is the most important part of XSL
  • XSLT transforms an XML document into another XML document (or even to another type of XML doc like XHTML);
  • XSLT uses XPath to navigate in XML documents
  • XSLT is a W3C Recommendation
XSLT is the most important part of XSL. XSLT is used to transform an XML document into another XML document, or another type of document that is recognized 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.
XSLT uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents.

XSLT 2.0

This new version has many new features like the new element
xsl:for-each-group
to group information.
There was no grouping feature on V1.0 and this was usually done using what became known has "Muenchian Grouping" technique. This article demonstrates the Muenchian Grouping and the new way of doing it using xsl:for-each-group.

XSLT support

Browser support:

XSLT processor implementations:
There are a couple of XSLT processors available for many platforms like:
 This book quote has instructions on how to install this XSLT processors.

XSLT tools:
  • XSLT Debugger for NetBeans (official documentation with GUI tutorial on how to use it) - seems to use the Xalan XSLT processor so only has support for XSLT 1.0;
  • Altova's XMLSpy, a fast XML Editor with support for XSLT 2.0 - includes a powerful XSLT debugger for troubleshooting and perfecting XSLT 1.0 and 2.0 stylesheets.

XSLT examples



XSL-FO ("Extensible Stylesheet Language Formatting Objects")

(aka XSLFO or by its parent name "XSL")

What is XSL-FO?

  • XSL-FO is about formatting XML data for output to screen, paper or other media.
  • XSL-FO stands for Extensible Stylesheet Language Formatting Objects
  • XSL-FO is based on XML
  • XSL-FO is a W3C Recommendation
  • XSL-FO is now formally named XSL (or you can think of it has a part of XSL)

XSL-FO examples


No comments:

Post a Comment