Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="ISO-8859-1" ?>
- - <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- - <xsl:template match="/">
- - <html>
- - <head>
- <title>Your Search Results</title>
- <style>h2 {color: red; font-family: arial black; font-size: 30px; font-weight: bold;} .titlehead {color: red; font-family: arial; font-size: 15px; font-weight: bold;} .descrip {color: black; font-family: arial; font-size: 15px; font-weight: bold;} .decont {color: black; font-family: arial; font-size: 15px; font-weight: normal;}</style>
- </head>
- - <body>
- <h2>Your Search Results</h2>
- - <table width="40%" border="0" bgcolor="white" cellpadding="0" cellspacing="0">
- - <xsl:apply-templates select="catalog/item">
- <xsl:sort select="title" />
- </xsl:apply-templates>
- </table>
- </body>
- </html>
- </xsl:template>
- - <xsl:template match="item">
- - <p>
- <xsl:apply-templates select="title" />
- <xsl:apply-templates select="author" />
- <xsl:apply-templates select="itnum" />
- <xsl:apply-templates select="publisher" />
- <xsl:apply-templates select="loanpe" />
- <xsl:apply-templates select="year" />
- </p>
- </xsl:template>
- - <xsl:template match="title">
- - <tr>
- - <td bgcolor="#FBEC5D">
- - <font class="titlehead">
- Title:
- <xsl:value-of select="." />
- </font>
- <br />
- </td>
- </tr>
- </xsl:template>
- - <xsl:template match="author">
- - <tr>
- - <td>
- - <font class="descrip">
- Author:
- - <span class="decont">
- <xsl:value-of select="." />
- </span>
- </font>
- <br />
- </td>
- </tr>
- </xsl:template>
- - <xsl:template match="itnum">
- - <tr>
- - <td>
- - <font class="descrip">
- Item Number:
- - <span class="decont">
- <xsl:value-of select="." />
- </span>
- </font>
- <br />
- </td>
- </tr>
- </xsl:template>
- - <xsl:template match="publisher">
- - <tr>
- - <td>
- - <font class="descrip">
- Publisher:
- - <span class="decont">
- <xsl:value-of select="." />
- </span>
- </font>
- <br />
- </td>
- </tr>
- </xsl:template>
- - <xsl:template match="loanpe">
- - <tr>
- - <td>
- - <font class="descrip">
- Loan Period:
- - <span class="decont">
- <xsl:value-of select="." />
- </span>
- </font>
- <br />
- </td>
- </tr>
- </xsl:template>
- - <xsl:template match="year">
- - <tr>
- - <td>
- - <font class="descrip">
- Year Published:
- - <span class="decont">
- <xsl:value-of select="." />
- </span>
- </font>
- <br />
- <br />
- <br />
- </td>
- </tr>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement