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:variable name="colors" select="document('trans.xml')/bgcolor" />
- <xsl:template match="/">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="style.css" />
- <title>Bikes</title>
- </head>
- <body>
- <xsl:for-each select = "bikes/bike">
- <xsl:choose>
- <xsl:when test="@type='BMX'">
- <div style="bachround-color:yellow">
- </div>
- </xsl:when>
- <div>
- <table border="1">
- <tr>
- <th>Name</th>
- <th>Company</th>
- <th>Color</th>
- <th>Price</th>
- </tr>
- <tr>
- <td><xsl:value-of select = "name"/></td><br/>
- <td><xsl:value-of select = "company"/></td><br/>
- <td><xsl:value-of select = "color"/></td><br/>
- <td><xsl:value-of select = "price"/></td><br/>
- </tr>
- <img>
- <xsl:attribute name="src">
- <xsl:value-of select="photo" />
- </xsl:attribute>
- </img>
- </table>
- </div>
- </xsl:choose>
- </xsl:for-each>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement