Advertisement
moreiramota

Untitled

May 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 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:output method="html"/>
  4. <xsl:template match="/InsureAgility">
  5. <html>
  6. <body>
  7. <h1> Clientes' Basic Details</h1>
  8. <tr>
  9. <xsl:apply-templates select="casos"/>
  10. </tr>
  11. </body>
  12. </html>
  13. </xsl:template>
  14. <xsl:template match="casos">
  15. <html>
  16. <head>
  17. <title>XML to HTML
  18. </title>
  19. </head>
  20. <body>
  21. <xsl:apply-templates select="Cliente"/>
  22. </body>
  23. </html>
  24. </xsl:template>
  25.  
  26.  
  27.  
  28. <xsl:template match="Cliente">
  29. <h3>CC:
  30. <xsl:value-of select="cc"/>
  31. </h3>
  32. <h5>Nome:
  33. <xsl:value-of select="nome"/>
  34. </h5>
  35. <h5>Contactos:
  36. <xsl:value-of select="contactos"/>
  37. </h5>
  38. <h5>Morada:
  39. <xsl:apply-templates select="morada"/>
  40. </h5>
  41. </xsl:template>
  42.  
  43. <xsl:template match="cc">
  44. <h6>Numero:
  45. <xsl:value-of select="numero"/>
  46. </h6>
  47. <h6>
  48. Data Fim:
  49. <xsl:value-of select="dataFim"/>
  50. </h6>
  51. </xsl:template>
  52.  
  53.  
  54.  
  55. <xsl:template match="nome">
  56. <h6>Primeiro:
  57. <xsl:value-of select="primeiro"/>
  58. </h6>
  59. <h6>
  60. Apelido:
  61. <xsl:value-of select="apelido"/>
  62. </h6>
  63. </xsl:template>
  64.  
  65.  
  66. <xsl:template match="contactos">
  67. <h6>Telefone:
  68. <xsl:value-of select="telefone"/>
  69. </h6>
  70. </xsl:template>
  71.  
  72.  
  73. <xsl:template match="morada">
  74. <h6>Rua:
  75. <xsl:value-of select="rua"/>
  76. </h6>
  77. <h6>
  78. Porta:
  79. <xsl:value-of select="porta"/>
  80. </h6>
  81. <h6>
  82. Localidade:
  83. <xsl:value-of select="localidade"/>
  84. </h6>
  85. <h6>
  86. Pais:
  87. <xsl:value-of select="pais"/>
  88. </h6>
  89. <h6>
  90. Codigo Postal:
  91. <xsl:value-of select="codigo_postal"/>
  92. </h6>
  93. </xsl:template>
  94. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement