CREATE A XSLT STYLE SHEET FOR ONE PATIENT

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href='a.xsl' type='text/xsl'?>

<patients>

<patient>
<name>
<fname>Vishwas</fname>
<mname>s</mname>
<lname>d</lname>
</name>
<ssn>054</ssn>
<age>20</age>
<rno>10</rno>
<insurance type="primary">
<id>001</id>
<gno>205</gno>
<addr>Shimoga</addr>
</insurance>
<insurance type="sec">
<id>202</id>
<gno>305</gno>
<addr>Shimoga</addr>
</insurance>
<mp>liver</mp>
<dg>nill</dg>
</patient>

</patients>



A.XSL

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Patient information</h2>
<table border="1">
<tr>
<th>SSN</th>
<th>Name</th>
<th>Room no</th>
</tr>

<tr>
<td>
<xsl:value-of select="patients/patient/ssn"/>
</td>
<td>
<xsl:value-of select="patients/patient/name"/>
</td>
<td>
<xsl:value-of select="patients/patient/rno"/>
</td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>