Hi all
I'm new to XML. I am testing an XML file formatted using XSL. When I call the XML through the browser directly it works. I now want to call this XML in my html using Data Island. This does not work in my browsers. Can someone help? I have the following config:
XP with IIS, .NET
XML File: rightmenu.xml
XSL File: Rightmenu.XSL<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="RightMenu.xsl"?>
<Document>
<Topic Src="RightMenu1.xml" Caption="Right Menu1" />
<Topic Src="RightMenu2.xml" Caption="Right Menu2" />
<Topic Src="RightMenu3.xml" Caption="Right Menu3" />
<Topic Src="RightMenu4.xml" Caption="Right Menu4" />
<Topic Src="RightMenu5.xml" Caption="Right Menu5" />
<Topic Src="RightMenu6.xml" Caption="Right Menu6" />
</XML>
HTML File: rightmenu.htm<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<title>Right Menu</title>
<link rel="stylesheet" href="CLI.css" TYPE="text/css"/>
</head>
<body class="toc_body">
<xsl:apply-templates select="Document"/>
</body>
</html>
</xsl:template>
<xsl:template match="Document">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="Topic">
<table width="120" border="0">
<tr><td>
<a class="toc_topic" target="main">
<xsl:choose>
<xsl:when test="@Src">
<xsl:attribute name="href">
<xsl:value-of select="@Src"/>
</xsl:attribute>
</xsl:when>
<xsltherwise>
</xsltherwise>
</xsl:choose>
<xsl:value-of select="@Caption"/>
</a>
</td></tr>
<tr><td height="2" bgcolor="#0066CC" valign="top"> </td></tr>
</table>
</xsl:template>
</xsl:stylesheet>
Thanks<html>
<body>
<xml id="doc" src="rightmenu.xml"></xml>
<table border="1" datasrc="#doc">
<tr>
<td><span datafld="Topic"></span></td>
</tr>
</table>
</body>
</html>




therwise>
Reply With Quote