Advertisement
moreiramota

Untitled

May 19th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2.  
  3. <!--
  4. Document : AllClienteData.xsl
  5. Created on : 19 de Maio de 2019, 17:11
  6. Author : morei
  7. Description:
  8. Purpose of transformation follows.
  9. -->
  10. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  11. <xsl:output method="html"/>
  12. <xsl:template match="/casos">
  13. <html>
  14. <body>
  15. <h1> Clientes' Name and Objetcts</h1>
  16. <tr>
  17. <xsl:apply-templates select="cliente"/>
  18. </tr>
  19. </body>
  20. </html>
  21. </xsl:template>
  22.  
  23. <xsl:template match="cliente">
  24. <h5>Nome:
  25. <xsl:apply-templates select="nome"/>
  26. </h5>
  27. <h5>Objetos
  28. <xsl:apply-templates select="objetos"/>
  29. </h5>
  30. </xsl:template>
  31.  
  32. <xsl:template match="nome">
  33. <h6>Nome
  34. <xsl:value-of select="primeiro"/>
  35. </h6>
  36. <h6>Apelido
  37. <xsl:value-of select="apelido"/>
  38. </h6>
  39. </xsl:template>
  40.  
  41. <xsl:template match="objetos">
  42. <h6>Objecto
  43. <xsl:apply-templates select="objecto"/>
  44. </h6>
  45. </xsl:template>
  46.  
  47.  
  48.  
  49. <xsl:template match="objecto">
  50. <h6>
  51. Nome Objeto
  52. <xsl:value-of select="nomeObjeto"/>
  53. </h6>
  54. <h6>
  55. Morada Objeto
  56. <xsl:apply-templates select="moradaObjeto"/>
  57. </h6>
  58. <h6>
  59. Coberturas Objeto
  60. <xsl:apply-templates select="coberturas"/>
  61. </h6>
  62. <h6>
  63. Valor Premio Objeto
  64. <xsl:value-of select="valorPremio"/>
  65. </h6>
  66. <h6>
  67. Vigencia Objeto
  68. <xsl:apply-templates select="vigencia"/>
  69. </h6>
  70. <h6>
  71. Ocurencias Objeto
  72. <xsl:apply-templates select="ocurrencias"/>
  73. </h6>
  74. </xsl:template>
  75.  
  76.  
  77. <xsl:template match="coberturas">
  78. <h6>
  79. Cobertura
  80. <xsl:apply-templates select="cobertura"/>
  81. </h6>
  82. </xsl:template>
  83.  
  84.  
  85. <xsl:template match="cobertura">
  86. <h6>Nome Cobertura
  87. <xsl:value-of select="cobertura"/>
  88. </h6>
  89. <h6>Descricao
  90. <xsl:value-of select="descricao"/>
  91. </h6>
  92. </xsl:template>
  93.  
  94.  
  95. <xsl:template match="moradaObjeto">
  96. <tr bgcolor="#9acd32">
  97. <th>moradaObjeto</th>
  98.  
  99. <h6>Rua:
  100. <xsl:value-of select="rua"/>
  101. </h6>
  102. <h6>
  103. Porta:
  104. <xsl:value-of select="porta"/>
  105. </h6>
  106. <h6>
  107. Localidade:
  108. <xsl:value-of select="localidade"/>
  109. </h6>
  110. <h6>
  111. Pais:
  112. <xsl:value-of select="pais"/>
  113. </h6>
  114. <h6>
  115. Codigo Postal:
  116. <xsl:value-of select="codigo_postal"/>
  117. </h6>
  118. </tr>
  119. </xsl:template>
  120.  
  121. <xsl:template match="vigencia">
  122. <h5>Data inicio
  123. <xsl:value-of select="dataInicio"/>
  124. </h5>
  125. <h5>Data fim
  126. <xsl:value-of select="dataFim"/>
  127. </h5>
  128. </xsl:template>
  129.  
  130.  
  131. <xsl:template match="ocurrencias">
  132. <h5>Ocurencias Total
  133. <xsl:value-of select="ocurrenciasTotal"/>
  134. </h5>
  135. <h5>Ocurencias Penultimo Ano
  136. <xsl:value-of select="ocurrenciasPenultimoAno"/>
  137. </h5>
  138. <h5>Ocurencias Ultimo Ano
  139. <xsl:value-of select="ocurrenciasUltimoAno"/>
  140. </h5>
  141. </xsl:template>
  142.  
  143. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement