 | Level: Intermediate Contributors: W3C 06 Feb 2007 Updated 25 Apr 2007 Extensible Stylesheet Language Transformations (XSLT)
allows you to describe transforms from an input XML document to an
output tree, such as XML, HTML, or text. You can use it for
sophisticated presentation of XML documents or for transforms from one
XML format to another. Delve further into this successful language and
discover what it, as well what EXSLT, can do for you.
Extensible
Stylesheet Language Transformations (XSLT) Version 1.0
[W3C Recommendation] is a language for describing
transforms from an input XML document to an output tree. The output tree
can, for example, take the form of an HTML document or another XML
format, and as such, XSLT can be a language for rendering XML into
legacy browser display form or for scripted operations on XML files. The
transform is itself defined as an XML document in a special vocabulary.
XML Path Language (XPath) is used for accessing the
source document and general expression processing, and there are special
instructions for setting up processing rules (XSLT is a declarative
language) and directing the creation of the output tree.
XSLT 1.0 is an extraordinarily successful language, and
it covers most common XML processing tasks. If you're familiar with XML,
it is easy to learn the basics of XSLT, though mastering the language
takes some effort. It has a well-designed extensibility mechanism, and
its declarative processing model allows for maintainable and reusable
code. The standard way to link an XML document to its XSLT stylesheet
document is defined in
Associating Style Sheets with XML documents Version 1.0
[W3C Recommendation]. The XSLT specification has
been widely translated.
EXSLT and XSLT 2.0
As mentioned, XSLT has a nice extension mechanism with
which you can define additional capabilities using the language of your
choice. But it's even nicer when you don't have to write extensions
because someone else has done so for you.
EXSLT
[community specification] is a standard set of
such extensions defined in an implementation-agnostic way. EXSLT
attempts to cover the most commonly needed extensions, such as date
processing, regular expressions, and mathematical operations. Many XSLT
implementations implement one or more EXSLT modules.
XSLT Version
2.0
offers some key improvements
based on collective experience with XSLT 1.0, but it is closely tied to
XPath 2.0, which is somewhat controversial.
Resources
-
Investigating XSLT: The XML transformation
language (LindaMay Patterson, developerWorks, August 2001): Get
started with XSLT.
-
Create multi-purpose Web content with XSLT:
(Nicholas Chase, developerWorks, March 2003): Get started with XSLT.
-
Develop Python/XML with 4Suite, Part 2: 4XPath and
4XSLT (Chimezie Ogbuji, developerWorks, October 2001): Tutorial
which includes an introduction to XSLT.
-
What kind
of language is XSLT? (Michael Kay, developerWorks, April 2005):
Learn how to begin the journey from XSLT beginner to master.
-
XSLT
tutorial: ZVON offers an in-depth look at XSLT.
-
EXSLT
by example (Uche Ogbuji, developerWorks, February 2003): Get started
with EXSLT.
-
What kind
of language is XSLT? (developerWorks, April 2005): The best way to
become an expert in XSLT is to understand the basic nature of the
language.
-
Planning to upgrade XSLT 1.0 to 2.0, Part 1:
Improvements in XSLT (developerWorks, October 2006): If you're
preparing to make the transition to XSLT 1.0, read this article (Part
1).
-
Planning to upgrade XSLT 1.0 to 2.0, Part 2: Five
strategies for changing from XSLT 1.0 to 2.0 (developerWorks,
November 2006): If you're preparing to make the transition to XSLT 1.0,
read this article (Part 2).
-
XSLT
Reference: By ZVON.
-
XSL FAQ
by Dave Pawson covers XSLT and XPath as well as XSL-
FO.
-
More than 100
examples of XSLT stylesheets: TopXML offers these examples arranged
by category.
-
XSLT
Pages: An excellent reference for common XSLT questions and problems
by Jeni Tennison, who is famous for her clear and incisive explanations
of XSLT arcana.
-
XSL
reference page: The World Wide Web Consortium (W3C) maintains this
site.
- Read about other XML standards:
Index of XML
standards.
- Participate in any of several XML-centered forums:
XML
zone discussion forums.
- Get involved in the developerWorks community: developerWorks blogs
- Find out how you can become an IBM-Certified
Developer in XML and related technologies at IBM XML
certification.
- See the developerWorks XML Zone for a wide range of
technical articles and tips, tutorials, standards, and IBM Redbooks at
XML
technical library.
- Stay current with technology in these sessions: developerWorks technical events and webcasts.
- Build your next development project with trial
software available for download directly from developerWorks: IBM trial software
|  | |  |