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:output method="html"/>
- <xsl:template match="/casos">
- <html>
- <body>
- <h1> Clientes' Basic Details</h1>
- <tr>
- <xsl:apply-templates select="cliente"/>
- </tr>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="casos">
- <html>
- <head>
- <title>XML to HTML
- </title>
- </head>
- <body>
- <xsl:apply-templates select="cliente"/>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="cliente">
- <h3>CC:
- <xsl:apply-templates select="cc"/>
- </h3>
- <h5>Nome:
- <xsl:apply-templates select="nome"/>
- </h5>
- <h5>Contactos:
- <xsl:apply-templates select="contactos"/>
- </h5>
- <h5>Morada:
- <xsl:apply-templates select="morada"/>
- </h5>
- </xsl:template>
- <xsl:template match="cc">
- <h6>Numero:
- <xsl:value-of select="numero"/>
- </h6>
- <h6>
- Data Fim:
- <xsl:value-of select="dataFim"/>
- </h6>
- </xsl:template>
- <xsl:template match="nome">
- <h6>Primeiro:
- <xsl:value-of select="primeiro"/>
- </h6>
- <h6>
- Apelido:
- <xsl:value-of select="apelido"/>
- </h6>
- </xsl:template>
- <xsl:template match="contactos">
- <h6>Telefone:
- <xsl:value-of select="telefone"/>
- </h6>
- </xsl:template>
- <xsl:template match="morada">
- <h6>Rua:
- <xsl:value-of select="rua"/>
- </h6>
- <h6>
- Porta:
- <xsl:value-of select="porta"/>
- </h6>
- <h6>
- Localidade:
- <xsl:value-of select="localidade"/>
- </h6>
- <h6>
- Pais:
- <xsl:value-of select="pais"/>
- </h6>
- <h6>
- Codigo Postal:
- <xsl:value-of select="codigo_postal"/>
- </h6>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement