horizontal menubar using XML-XSL

Get new comments by email
You can cancel email alerts at anytime.
Comments (1)

Ajay in Delhi, India

30 months ago

Hi Alex Sloution is given below:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="www.w3.org/1999/XSL/Transform"
xmlns:xs="www.w3.org/2001/XMLSchema" xmlns:xd="www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xs xd" version="2.0">
<xsl:output encoding="UTF-8" indent="yes"/>
<xsl:template match="MenuList">

<div id="smoothmenu1" class="ddsmoothmenu">
<ul>
<xsl:apply-templates/>
</ul>

</div>

</xsl:template>
<xsl:template match="parentMenu">
<li><a href="#JS">
<xsl:value-of select="@MenuName"/></a>
<xsl:if test="Menu">
<ul>
<xsl:apply-templates/>
</ul>
</xsl:if>
</li>
</xsl:template>

<xsl:template match="Menu">
<li>
<a href="#JS"> <xsl:value-of select="@MenuName"/></a>
</li>

</xsl:template>
</xsl:stylesheet>

- Was this comment helpful? Yes / No (2) Reply - Report abuse

» Sign in or create an account to comment on this topic.