I have a simple xml and xsl program to print a student data in a table and this is the first time I'm using xml. After completing the program while running the program I'm not getting the output on the table. On first I thought there is may be some errors on my code, but I tried the same xml and xsl files on three of my friends ubuntu system and it's working perfectly. For information I'm using ubuntu 18 and all of my friends are using the same. I tried the same code on the same way I did on my system on theirs, but still I'm not getting the output. Can anyone tell me why I'm having this problem.
This is my xml file(Student.xml):
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Student.xsl"?>
<studInfo>
<stud>
<name>ABC</name>
<dob>12/04/2020</dob>
<rno>REG001</rno>
<course>MCA</course>
</stud>
<stud>
<name>ABC</name>
<dob>12/04/2020</dob>
<rno>REG001</rno>
<course>MCA</course>
</stud>
<stud>
<name>ABC</name>
<dob>12/04/2020</dob>
<rno>REG001</rno>
<course>MCA</course>
</stud>
</studInfo>
This is my xsl file(Student.xsl):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Student Details</title>
</head>
<body>
<center>
<table border="1">
<caption>Student Details</caption>
<tr>
<th>Name</th>
<th>Date of birth</th>
<th>Register No</th>
<th>Course</th>
</tr>
<xsl:for-each select="/studInfo/stud">
<tr>
<td>
<xsl:value-of select="name" />
</td>
<td>
<xsl:value-of select="dob" />
</td>
<td>
<xsl:value-of select="rno" />
</td>
<td>
<xsl:value-of select="course" />
</td>
</tr>
</xsl:for-each>
</table>
</center>
</body>
</html>
</xsl:template>
</xsl:transform>
I run my xml file by right clicking the xml file and selecting the option open with mozilla firefox. The same way is working for my friends, but not for me.
I'm getting my output on a straight line without the table like this:
ABC 12/04/2020 REG001 MCA ABC 12/04/2020 REG001 MCA ABC 12/04/2020 REG001 MCA
Can anyone help me with this. Please