Advertisement
Fhernd

http://pastebin.com/yth2MZjs

Sep 5th, 2014
2,947
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 0.89 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0">
  3.     <xsl:output method="xml" indent="yes" encoding="UTF-8" />
  4.     <xsl:template match="/persons">
  5.         <html>
  6.             <head>
  7.                 <title>Uso de XSLT</title>
  8.             </head>
  9.             <body>
  10.                 <h1>Personas</h1>
  11.                 <ul>
  12.                     <xsl:apply-templates select="persona">
  13.                         <xsl:sort select="apellido" />
  14.                     </xsl:apply-templates>
  15.                 </ul>
  16.             </body>
  17.         </html>
  18.     </xsl:template>
  19.     <xsl:template match="persona">
  20.         <li>
  21.             <xsl:value-of select="apellido" />
  22.             <xsl:text>,</xsl:text>
  23.             <xsl:value-of select="nombre" />
  24.         </li>
  25.     </xsl:template>
  26. </xsl:stylesheet>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement