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" xmlns="http://www.w3.org/1999/xhtml">
- <xsl:template match="students">
- <html>
- <title>4b</title>
- <body>
- <table border="1">
- <tr>
- <th colspan="6">Student Information</th>
- </tr>
- <tr>
- <th>USN</th>
- <th>Name</th>
- <th>College</th>
- <th>Branch</th>
- <th>Year of Joining</th>
- <th>email</th>
- </tr>
- <xsl:for-each select="vtu">
- <xsl:if test="position()=1">
- <tr>
- <td><xsl:value-of select="usn"/></td>
- <td><xsl:value-of select="name"/></td>
- <td><xsl:value-of select="college"/></td>
- <td><xsl:value-of select="branch"/></td>
- <td><xsl:value-of select="yoj"/></td>
- <td><xsl:value-of select="email"/></td>
- </tr>
- </xsl:if>
- </xsl:for-each>
- </table>
- </body>
- </html>
- </xsl:template>
- </xsl:stylesheet>
- 4b.xsl
- <?xml version="1.0" encoding="UTF-8"?>
- <?xml-stylesheet type="text/xsl" href="4b.xsl"?>
- <students>
- <vtu>
- <usn>4mt14cs039</usn>
- <name>divya</name>
- <college>mite</college>
- <branch>cse</branch>
- <yoj>2014</yoj>
- <email>divyacharan19@gmail.com</email>
- </vtu>
- <vtu>
- <usn>4mt14cs031</usn>
- <name>chrislene dias</name>
- <college>mite</college>
- <branch>cse</branch>
- <yoj>2014</yoj>
- <email>dias.chrislene18@gmail.com</email>
- </vtu>
- <vtu>
- <usn>4mt14cs051</usn>
- <name>mallika</name>
- <college>mite</college>
- <branch>cse</branch>
- <yoj>2014</yoj>
- <email>kavyashreeshettigar@gmail.com</email>
- </vtu>
- </students>
- 4b.xml
Add Comment
Please, Sign In to add comment