Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="/">
- <html>
- <body>
- <h1>Mis CD's</h1>
- <table border="1">
- <tr bgcolor="#887788">
- <td>Título</td>
- <td>Artista</td>
- <td>Sello</td>
- <td>Año</td>
- <td>Canciones</td>
- </tr>
- <xsl:for-each select="cdteca/cd">
- <xsl:choose>
- <xsl:when test="anyo >1995">
- <tr bgcolor="red">
- <td><xsl:value-of select="titulo"/>
- </td>
- <td><xsl:value-of select="artista"/>
- </td>
- <td><xsl:value-of select="sello"/>
- </td>
- <td><xsl:value-of select="anyo"/>
- </td>
- <td>
- <xsl:for-each select="cancion">
- <tr><xsl:value-of select="."/></tr>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:when>
- <xsl:otherwise>
- <tr bgcolor="green">
- <td><xsl:value-of select="titulo"/>
- </td>
- <td><xsl:value-of select="artista"/>
- </td>
- <td><xsl:value-of select="sello"/>
- </td>
- <td><xsl:value-of select="anyo"/>
- </td>
- <td>
- <xsl:for-each select="cancion">
- <tr><xsl:value-of select="."/></tr>
- </xsl:for-each>
- </td>
- </tr>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:for-each>
- </table>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement