Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:variable name="colors" select="document('trans.xml')/bgcolor" />
  4. <xsl:template match="/">
  5. <html>
  6. <head>
  7. <link rel="stylesheet" type="text/css" href="style.css" />
  8. <title>Bikes</title>
  9. </head>
  10. <body>
  11.  
  12. <xsl:for-each select = "bikes/bike">
  13. <div>
  14. <table border="1">
  15. <tr>
  16. <th>Name</th>
  17. <th>Company</th>
  18. <th>Color</th>
  19. <th>Price</th>
  20. </tr>
  21.  
  22. <tr>
  23. <td><xsl:value-of select = "name"/></td><br/>
  24. <td><xsl:value-of select = "company"/></td><br/>
  25. <td><xsl:value-of select = "color"/></td><br/>
  26. <td><xsl:value-of select = "price"/></td><br/>
  27. </tr>
  28. <img>
  29. <xsl:attribute name="src">
  30. <xsl:value-of select="photo" />
  31. </xsl:attribute>
  32. </img>
  33. </table>
  34. </div>
  35. </xsl:for-each>
  36. </body>
  37. </html>
  38. </xsl:template>
  39. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement