Page not displaying

admin

Administrator
Staff member
I am new to XML and trying to get an xml page to show up.
Please advise what exactly I need to do to get this to work??

Here is the xml page called two.xml:

<?xml version="1.0"?>
<xsl-stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
</head>
<body>
<xsl:for-each select="talltales/tt">
<div style="width:750px; padding:10px; margin-bottom: 10px; border: 4px double black; background-color:silver">
<xsl:apply-templates select="question"/>
<xsl:apply-templates select="a"/>
<xsl:apply-templates select="b"/>
</div>
</xsl:for-each>
</body>
</html>
</xsl:template>

<xsl:template match="question">
<div style="color:black; font-family: Times; font-size:16pt">
<xsl:value-of/>
</div>
</xsl:template>

<xsl:template match="a|b">
<div style="color:black; font-family: Times; font-size:12pt; text-indent:20px">
<xsl:value-of/>
</div>
</xsl:template>
</xsl:stylesheet>


Now here is the page called talltales.xml:

<?xml version="1.0" ?>
<talltales>
<tt answer="a">
<question>
This is the first question
</question>
<a>This is the a part</a>
<b>This is the a with b part</b>
</tt>
<tt answer="b">
<question>
This is the second question
</question>
<b>This is the b part</b>
</tt>
</talltales>


When I try and display two.xml it says:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
End tag 'xsl:stylesheet' does not match the start tag 'xsl-stylesheet'. Error processing resource 'http://myserver/two.xml'. Line 30, Position 3
</xsl:stylesheet>
--^



Did I diplay the wrong page or what do I need to do?
 
Back
Top