XSLT Tutorial

XSLT Introduction

XSL stands for eXtensible Stylesheet Language. It is a styling language for XML. XSLT, on the other hand, stands for XSL Transformations and is used to transform XML documents into different formats, for example, transforming XML into HTML.



<?xml version="1.0" encoding="UTF-8"?>
  <book category="Child">
    <title lang="en">ABC</title>
    <author>Author Name</author>
  <book category="IT">
    <title lang="en">XQuery Book</title>
    <author>Author 1</author>
    <author>Author 2</author>

XSLT Code:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="">
  <h2>List of Books</h2>
  <table border="1">
    <tr bgcolor="#9acd32">
      <th style="text-align:left">Title</th>
      <th style="text-align:left">Price</th>
    <xsl:for-each select="bookstore/book">
      <td><xsl:value-of select="title"/></td>
      <td><xsl:value-of select="price"/></td>



A basic understanding of HTML and XML.

XSLT Functions:

The same functions library is shared by XSLT 2.0, XPath 2.0, and XQuery 1.0. Thus, including over 100 built-in functions for string values, numeric values, date and time comparison, node and QName manipulation, sequence manipulation, and many more.

XSLT Tutorial List

Content Protection by DMCA.com
Please Share