R
Raghavendra RAV
Hi,
My Xml and Xsl files are included here...
On executing my xml file, i am not getting anything in my browser..
my browser shows blank..
please give me some solution or point where the problem is..
---------------xml file------------------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="MenuRender.xsl"?>
<TopMenu Caption="Links">
<Menu Type="SubMenu" Caption="Cybernet">
<Menu Type="MenuItem" href="http://cybernetsoft.com">
Cybernet Software Systems
</Menu>
<Menu Type="MenuItem" href="http://11.1.15.10">
Time Sheet
</Menu>
</Menu>
<Menu Type="SubMenu" Caption="Slash Support">
<Menu Type="MenuItem" href="http://slashsupport.com">
Slash Homepage
</Menu>
<Menu Type="MenuItem" href="http://24carats.slashsupport.com">
24 Carats Program
</Menu>
</Menu>
<Menu Type="MenuItem" href="http://readytestgo.com">
RTG Homepage
</Menu>
</TopMenu>
----------------------end of xml------------------------------------
-----------------------xsl file--------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- <xslaram name="CurrentPage">CurrentPage</xslaram>
<xslaram name="MenuId">1</xslaram> -->
<xsl:template match="/">
<HTML>
<BODY>
<table width="100px" border="0px" cellspacing="0px" cellpadding="0px">
<TR>
<TD class="MenuTitleBar">
<xsl:value-of select="@Caption"/>
</TD>
</TR>
<xsl:for-each select="Menu">
<xsl:choose>
<xsl:when test="@Type='SubMenu'">
<TR>
<TD class="SubMenu">
<xsl:value-of select="text()" />
</TD>
</TR>
<xsl:for-each select="Menu">
<TR>
<TD class="MenuItem">
<A>
<xsl:attribute name="href">
<xsl:value-of select="href" />
</xsl:attribute>
<xsl:value-of select="text()"/>
</A>
</TD>
</TR>
</xsl:for-each>
</xsl:when>
<xsltherwise>
<TR>
<TD class="MenuItem">
<A>
<xsl:attribute name="href">
<xsl:value-of select="href" />
</xsl:attribute>
<xsl:value-of select="text()"/>
</A>
</TD>
</TR>
</xsltherwise>
</xsl:choose>
</xsl:for-each>
</table>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
------------------------end of xsl file-----------------------
I am a newbie to xml. Please excuse me if there are silly mistakes.
Thanks,
Raghu
My Xml and Xsl files are included here...
On executing my xml file, i am not getting anything in my browser..
my browser shows blank..
please give me some solution or point where the problem is..
---------------xml file------------------------------------------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="MenuRender.xsl"?>
<TopMenu Caption="Links">
<Menu Type="SubMenu" Caption="Cybernet">
<Menu Type="MenuItem" href="http://cybernetsoft.com">
Cybernet Software Systems
</Menu>
<Menu Type="MenuItem" href="http://11.1.15.10">
Time Sheet
</Menu>
</Menu>
<Menu Type="SubMenu" Caption="Slash Support">
<Menu Type="MenuItem" href="http://slashsupport.com">
Slash Homepage
</Menu>
<Menu Type="MenuItem" href="http://24carats.slashsupport.com">
24 Carats Program
</Menu>
</Menu>
<Menu Type="MenuItem" href="http://readytestgo.com">
RTG Homepage
</Menu>
</TopMenu>
----------------------end of xml------------------------------------
-----------------------xsl file--------------------------------------
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- <xslaram name="CurrentPage">CurrentPage</xslaram>
<xslaram name="MenuId">1</xslaram> -->
<xsl:template match="/">
<HTML>
<BODY>
<table width="100px" border="0px" cellspacing="0px" cellpadding="0px">
<TR>
<TD class="MenuTitleBar">
<xsl:value-of select="@Caption"/>
</TD>
</TR>
<xsl:for-each select="Menu">
<xsl:choose>
<xsl:when test="@Type='SubMenu'">
<TR>
<TD class="SubMenu">
<xsl:value-of select="text()" />
</TD>
</TR>
<xsl:for-each select="Menu">
<TR>
<TD class="MenuItem">
<A>
<xsl:attribute name="href">
<xsl:value-of select="href" />
</xsl:attribute>
<xsl:value-of select="text()"/>
</A>
</TD>
</TR>
</xsl:for-each>
</xsl:when>
<xsltherwise>
<TR>
<TD class="MenuItem">
<A>
<xsl:attribute name="href">
<xsl:value-of select="href" />
</xsl:attribute>
<xsl:value-of select="text()"/>
</A>
</TD>
</TR>
</xsltherwise>
</xsl:choose>
</xsl:for-each>
</table>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
------------------------end of xsl file-----------------------
I am a newbie to xml. Please excuse me if there are silly mistakes.
Thanks,
Raghu