Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
- <xsl:output method="xml" indent="yes" encoding="UTF-8" />
- <xsl:template match="/persons">
- <html>
- <head>
- <title>Uso de XSLT</title>
- </head>
- <body>
- <h1>Personas</h1>
- <ul>
- <xsl:apply-templates select="persona">
- <xsl:sort select="apellido" />
- </xsl:apply-templates>
- </ul>
- </body>
- </html>
- </xsl:template>
- <xsl:template match="persona">
- <li>
- <xsl:value-of select="apellido" />
- <xsl:text>,</xsl:text>
- <xsl:value-of select="nombre" />
- </li>
- </xsl:template>
- </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement