XSLT (XSL Transformations) Question:
Download Questions PDF

How to use filtering in XSLT?


We can filter the XNL output by using filter operators.Some Legal filter operators are given below:
1.=(equal to)
2.!=(not equal to)
3.<(less than)
4.>(greater than)
I have given you a example. In this I have uses '=' equal to filer operation.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
<xsl:template match="/">
<h2>Book Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<xsl:for-each select="catalog/book[author='Jhon Smith']">
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="author"/></td>

Download XSLT Interview Questions And Answers PDF

Previous QuestionNext Question
Are you ready to relocate?How to use element in XSLT?