Documentation and tutorials
- A great introduction tutorial at w3shools (XSLT 1.0 only): XSLT Tutorial
- Official XSLT 2.0 documentation (includes examples)
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.
- 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
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 elementxsl: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 1.0 is supported by all major browsers;
- XSLT 2.0, has of 2012, is still not supported by any browser (Wikipedia, When will xslt 2.0 be finished, which browsers support XSLT 2.0 already?);
XSLT processor implementations:
There are a couple of XSLT processors available for many platforms like:
- Apache’s Xalan (XSLT1.0 only);
- Saxon XSLT (supports XSLT 2.0 as well);
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
- JAVA: check the javadoc of the Package javax.xml.transform this package defines the generic APIs for processing transformation instructions, and performing a transformation from source to result.
Check this example: xml to xml transformation
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
- create a PDF document using XSLFO and Apache FOP. (with source code example);
No comments:
Post a Comment