XSLT Programming Language Help For Students

Introduction to XSLT

XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. 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.

Example: XSLT, The following code shows the usage of the variable.

Declare the variable.
<xsl:variable name ="totalRecords">
      <xsl:for-each select ="/">
        <xsl:value-of select ="count(books/book)"/>

Access the variable.

        <td colspan="5">
     <b>Total No of Record(s):<xsl:value-of select ="$totalRecords"/>

XSLT Programming Language


You can download XSLT compiler click here