If I remove the Schema definition from my XML, then my XSLT works, but I can't get it to work with the Schema defined. I know this question has already been answered here, but I can't seem to get mine to work. I have the following XML header:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="student.xsl"?>
<Students xmlns="http:/www.example.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.com student.xsd">
<Student>
<SSN>622-12-5748</SSN>
<Name>
<First-Name>Alexander</First-Name>
<Last-Name>Mart</Last-Name>
</Name>
<Age>26</Age>
<Institution>UCSF</Institution>
<Email>Alexander@yahoo.com</Email>
</Student>
</Students>
Here is my XSLT file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="http://www.w3.org/2005/xpath-functions"
xmlns:xsi="http://www.example.com">
<xsl:template match="/">
<html>
<body>
<h2>Student Information</h2>
<table border="1">
<tr bgcolor="yellow">
<th>SSN</th>
<th>First Name</th>
</tr>
<xsl:for-each select="xsi:Students/Student">
<tr>
<td>
<xsl:value-of select="xsi:SSN"/>
</td>
<td>
<xsl:value-of select="xsi:Name/First-Name"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
What silly mistake am I making? Thanks in advance!