XML file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="biblio.xsl"?>
<bibliography>
<entry type="article">
<title>A History of MOOCs, Open Online Courses</title>
<author>Jane Karr</author>
<year>2014</year>
</entry>
<entry type="article">
<title>Apple Co-Founder Creates Electronic ID Tags</title>
<author>John Markoff</author>
<year>2003</year>
</entry>
</bibliography>
XSL file:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Bibliography Entries</h2>
<table border="1">
<xsl:for-each select="bibliography/entry">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="author"/></td>
<td><xsl:value-of select="year"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
If I don't link the XSLT file to the XML file, my XML file will output the tree structure in my browser's page but if I do link the XSLT file, it will show a blank page.
I am using Chrome, if it helps to know.
Thanks.
xml-stylesheet
and the xslt isn't present in the sources. – Jamisonjammal