Export (0) Print
Expand All

XSLT is a Programming Language

From a programmer's point of view, XSLT is a programming language for processing XML data — that is, transforming XML documents. As such, it supports the following:

  • A small set of flexible data types: Boolean, number, string, node-set, and external objects.

  • A full set of operations: <xsl:template>, <xsl:apply-templates>, <xsl:sort>,<xsl:output>, and so on.

  • Programming flow-control: <xsl:if>, <xsl:for-each>, <xsl:choose>, and so on.

XSLT adopts the XPath language syntax for expressions. There are also built-in and custom extension functions for building expressions for XML data queries and transformations. For a complete list of XSLT language features, see XSLT Reference and XPath Reference in this documentation.

An XSLT style sheet is an XML document. This means that XSLT instructions are expressed as XML elements, and an XSLT style sheet can transform other XSLT style sheets, or even itself.

The following topic provides a simple example of an XSLT style sheet, hello.xsl. This example transforms a simple XML document (hello.xml) into an HTML document to be displayed in a Web browser.

Show:
© 2015 Microsoft