• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 180
  • Last Modified:

xml dropdown menus

hI GUYS,

I desparately need to create an xml drop down menu currectly it drops down but how do i create a sub menu e.g

file
 |-----add( i hav acheived this)
          |----------------xyz(how do i acheive this)

pls help with some code examples, i have been trying all day. thanks

so far this is xml code

<?xml version="1.0"?>
<TOPICLIST TYPE="MenuItems">
<TOPICS TYPE="Employees">
  <TOPIC>
    <TITLE>Add</TITLE>
    <URL>Admin.aspx</URL>
  </TOPIC>
  <TOPIC>
    <TITLE>Edit</TITLE>
    <URL>AminEdit.aspx</URL>
      </TOPIC>
  <TOPIC>
    <TITLE>Search</TITLE>
    <URL>AminEdit.aspx</URL>
   
     </TOPIC>
 
   
 
  </TOPICS>

<TOPICS TYPE="Clients">
  <TOPIC>
    <TITLE>Clients</TITLE>
    <URL>#</URL>
  </TOPIC>
  <TOPIC>
    <TITLE>Matter</TITLE>
    <URL>#</URL>
  </TOPIC>
  <TOPIC>
    <TITLE>TaskCodes</TITLE>
    <URL>#</URL>
  </TOPIC>
</TOPICS>

<TOPICS TYPE="Receipts">
<TOPIC>
    <TITLE>ReceiptTypes</TITLE>
    <URL>#</URL>
      </TOPIC>
      <TOPIC>
    <TITLE>Expenses</TITLE>
    <URL>#</URL>
      </TOPIC>


  <TOPICS TYPE="Suppliers">
    <TOPIC>
      <TITLE>Add</TITLE>
      <URL>#</URL>
    </TOPIC>
    <TOPIC>
      <TITLE>Edit</TITLE>
      <URL>#</URL>
    </TOPIC>
    <TOPIC>
      <TITLE>Exit</TITLE>
      <URL>#</URL>
    </TOPIC>
  </TOPICS>

  <TOPICS TYPE="User Access &amp; Security">
    <TOPIC>
      <TITLE>Groups</TITLE>
      <URL>#</URL>
    </TOPIC>
    <TOPIC>
      <TITLE>Groups Approvers</TITLE>
      <URL>#</URL>
    </TOPIC>
    <TOPIC>
      <TITLE>Group Type</TITLE>
      <URL>#</URL>
    </TOPIC>
      </TOPICS>
 <TOPICS TYPE="System Administration">
    <TOPIC>
      <TITLE>System Params</TITLE>
      <URL>#</URL>
    </TOPIC>
    <TOPIC>
      <TITLE>Country</TITLE>
      <URL>#</URL>
    </TOPIC>
    <TOPIC>
      <TITLE>Currency</TITLE>
      <URL>#</URL>
    </TOPIC>
   
  </TOPICS>
 
   </TOPICS>

</TOPICLIST>


and this is the xsl code

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
  <!-- BUILD MENU BAR -->

  <DIV ID="divMenuBar">
  <TABLE ID="tblMenuBar" BORDER="0">
  <TR>
  <xsl:for-each select="//TOPICS[TOPIC]">
    <TD CLASS="clsMenuBarItem"><xsl:attribute name="ID">tdMenuBarItem<xsl:value-of select="@TYPE" /></xsl:attribute>
      <xsl:value-of select="@TYPE" /></TD>
   <xsl:if test="position()!=last()">
      <TD>|</TD>
   </xsl:if>
  </xsl:for-each>
  </TR>
  </TABLE>
  </DIV>

  <!-- BUILD INDIVIDUAL MENUS -->

  <xsl:for-each select="//TOPICS[TOPIC]">
    <DIV CLASS="clsMenu">
    <xsl:attribute name="ID">divMenu<xsl:value-of select="@TYPE" /></xsl:attribute>
      <DIV CLASS="clsMenuSpacer"></DIV>
      <xsl:for-each select="TOPIC">
      <DIV>
      <A>
        <xsl:attribute name="HREF"><xsl:value-of select="URL" />
        </xsl:attribute>
        <xsl:value-of select="TITLE" />
      </A>
      </DIV>
       <DIV>
      <A>
        <xsl:attribute name="HREF"><xsl:value-of select="URL" />
        </xsl:attribute>
        <xsl:value-of select="SUB" />
      </A>
      </DIV>
      </xsl:for-each>
    </DIV>
  </xsl:for-each>

</xsl:template>

</xsl:stylesheet>




0
SirReadAlot
Asked:
SirReadAlot
  • 4
  • 2
1 Solution
 
SirReadAlotAuthor Commented:
anyone??
0
 
SirReadAlotAuthor Commented:
can anyone give me some tips
0
 
a_twixt_in_the_taleCommented:
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
a_twixt_in_the_taleCommented:
0
 
SirReadAlotAuthor Commented:
no item demo?
0
 
SirReadAlotAuthor Commented:
tHANKS for the link
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now