Science  People  Locations  Timeline
Index: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Home > XSLT


 Contents
1
2 Sun Microsystems Inc.
3 The World Wide Web Consortium
In computer science, XSLT is the abbreviation for Extensible Stylesheet Language Transformations. It is a part of the XSL specification and is a language for transforming XML documents. XSLT is an XML transformation language.

To transform in this context means to apply an XSLT stylesheet to an incoming XML document and create a result tree. The result tree may be produced in XML, XHTML, HTML or any text-based format including plain text, tab- and comma-separated values, RTF and TeX. It may comprise text and markup from the XSLT stylesheet combined with parts of the incoming XML selected using XPath query-strings.

The language is declarative, i.e. an XSLT stylesheet consists of a collection of template rules which define the transformations to be performed. These template rules can be applied recursively.

The XSLT processor checks which template rules can be applied and executes the associated transformations based on a sequence of priorities.

An XSLT stylesheet is itself an XML document as the example below shows

STX is intended as a high-speed, low memory consumption alternative to XSLT.

1 Example

Example XSLT Stylesheet:

http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/> http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> test1

1

The following host names are currently in use at

Host nameURLUsed by
http://', normalize-space(node()), '.', local-name(..)))"/>

Example of incoming XML for above stylesheet:

www World Wide Web site java Java info www World Wide Web site validator web developers who want to get it right

Output XHTML that this would produce:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">test1

2 Sun Microsystems Inc.

The following host names are currently in use at sun.com

Host nameURLUsed by
www http://www.sun.comWorld Wide Web site
java http://java.sun.comJava info

3 The World Wide Web Consortium

The following host names are currently in use at w3.org

Host nameURLUsed by
www http://www.w3.orgWorld Wide Web site
validator http://validator.w3.orgweb developers who want to get it right



Read more »