Advertisement
tafazzi87

orario2.xsl

May 29th, 2013
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.42 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  3. <xsl:template match="/">
  4. <html>
  5. <head>
  6. <title></title>
  7. <link rel="stylesheet" type="text/css" href="orario2.css"/>
  8. </head>
  9. <body>
  10. <p id="titolo">ORARIO GENERALE</p>
  11. <p id="sottotitolo">
  12. <xsl:value-of select="struttura/@nome"/> - <xsl:value-of select="struttura/@sede"/> - <xsl:value-of select="struttura/@sitoweb"/>
  13. </p>
  14. <table border="1">
  15. <tr>
  16. <th>CODICE</th><th>NOME CORSO</th><th>TIPO CORSO</th><th>GIORNI DI LEZIONE</th><th>ORARIO INIZIO</th><th>ORARIO FINE</th><th>TIPO AULA</th><th>NOME AULA</th><th>CAPIENZA</th>
  17. </tr>
  18. <xsl:for-each select="struttura/corso">
  19. <tr bgcolor="{nomeaula/@aula}">
  20. <td><xsl:value-of select="@codice"/></td>
  21. <td><xsl:value-of select="nomecorso"/></td>
  22. <td><xsl:value-of select="tipocorso"/></td>
  23. <td><xsl:value-of select="frequenzacorso/@frequenzac"/></td>
  24. <td><xsl:value-of select="dalleore"/></td>
  25. <td><xsl:value-of select="alleore"/></td>
  26. <td><xsl:value-of select="tipoaula/@aula"/></td>
  27. <td><xsl:value-of select="nomeaula/@aula"/></td>
  28. <td>
  29. <xsl:choose>
  30. <xsl:when select="nomeaula/@aula='RED'">
  31. 30
  32. </xsl:when>
  33. <xsl:otherwise>
  34. <xsl:choose>
  35. <xsl:when select="nomeaula/@aula='BLUE'">
  36. 50
  37. </xsl:when>
  38. <xsl:otherwise>
  39. 60
  40. </xsl:otherwise>
  41. </xsl:choose>
  42. </xsl:otherwise>
  43. </xsl:choose>
  44. </td>
  45. </tr>
  46. </xsl:for-each>
  47. </table>
  48. </body>
  49. </html>
  50. </xsl:template>
  51. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement