I'm trying to link these two files so I can display the attribute and elements already in the code (@name and callNo.) For some reason, these files aren't linking even though I've checked the file spellings and all. If I try to run the XSL file, the page won't display the attribute/element I'm trying to retrieve. There is no error as far as I know by the way.
Question2.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Question2.xsl"?>
<!DOCTYPE patron [
<!ELEMENT patron (item*)>
<!ATTLIST patron name CDATA #REQUIRED>
<!ELEMENT item (title,authors,callNo,due)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT authors (#PCDATA)>
<!ELEMENT callNo (#PCDATA)>
<!ELEMENT due (#PCDATA)>
]>
<patron name="John Smith">
<item>
<title>Wireless network security</title>
<authors>T. Wrightson</authors>
<callNo>212.12/56</callNo>
<due>25-12-2016</due>
</item>
<item>
<title>Analysis</title>
<authors>T. Tao</authors>
<callNo>515/305</callNo>
<due>23-12-2016</due>
</item>
<item>
<title>The art of computer programming</title>
<authors>D.E. Knuth</authors>
<callNo>005.1/300</callNo>
<due>25-11-2016</due>
</item>
<item>
<title>Python for dummies</title>
<authors>S. Maruch and A. Ranum</authors>
<callNo>145.3/157</callNo>
<due>01-10-2016</due>
</item>
</patron>
Question2.xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xsl:output method="xml" indent="yes" encoding="UTF-8" />
<xsl:template match="/patron">
<html>
<head>
<title>Question2</title>
</head>
<body>
<h1>
<xsl:text>Patron record:</xsl:text>
<xsl:value-of select="@name" />
</h1>
<font size="6" color="green">
<xsl:value-of select="callNo" />
</font>
</body>
</html>
</xsl:template>
</xsl:stylesheet>