Directory

Encyclopedia

NodeWorks
                              ENCYCLOPEDIA

Link Checker

Home
Encyclopedia : X : XS : XSL :

XSL Transformations

 

 

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:
test1

Sun Microsystems Inc.

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

XSL Transformations

XSL Transformations, or XSLT, is an XML-based scripting language used for transforming XML documents. It is the XML transformation language part of the XSL specification (the other parts being XSL-FO and XPath). As with XML and HTML, the XSLT specification is a Recommendation developed by the W3C.

To transform in this context means to apply an XSLT stylesheet to an XML document, stored as a source tree, so as to 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 document, selected using XPath query-strings. Among many other options, the result tree may be written to an output file, transmitted over a network or simply displayed locally.

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.

The W3C finalized the XSLT 1.0 specification in 1999 and the XSLT 2.0 specification currently has 'Working Draft' status.

Example


Example XSLT Stylesheet:
test1

The following host names are currently in use at

Host nameURLUsed by
http://', normalize-space(node()), '.', local-name(..)))"/>
Host nameURLUsed by
www http://www.sun.comWorld Wide Web site
java http://java.sun.comJava info

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

See also

  • STX is intended as a high-speed, low memory consumption alternative to XSLT.
  • Smarty is a template engine written in PHP.

    External links

  • Implementations for Java:
  • * Xalan-Java
  • * SAXON by Michael Kay
  • * XT originally by James Clark
  • * Oracle XSLT, in the Oracle XDK
  • Implementations for C or C++:
  • * Xalan-C++
  • * libxslt the XSLT C library for Gnome
  • * Sablotron, which is integrated into PHP
  • Implementations for Python:
  • * 4XSLT, in the 4Suite toolkit by Fourthought, Inc.
  • * lxml by Martijn Faassen is a Pythonic wrapper of the libxslt C library
  • Implementations for specific operating systems:
  • * Microsoft's MSXML library may be used in various Microsoft Windows application development environments and languages, such as .Net, Visual Basic, C, and JScript.
  • Implementations integrated into web browsers:
  • * Mozilla has native XSLT support.
  • * X-Smiles has native XSLT support.
  • * Internet Explorer supports either XSLT 1.0 or an earlier version, depending on which MSXML libraries are installed and how they are registered.



    NodeWorks boosts web surfing!
    Page Returned in 0.082 seconds - HTML Compressed 69.7%

    This article is from Wikipedia. All text is available
    under the terms of the GNU Free Documentation License.
     GNU Free Documentation License
    © 2008 Chamas Enterprises Inc.