Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

xml dropdown menus

Posted on 2004-10-28
6
Medium Priority
?
178 Views
Last Modified: 2006-11-17
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
Comment
Question by:SirReadAlot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 

Author Comment

by:SirReadAlot
ID: 12435388
anyone??
0
 

Author Comment

by:SirReadAlot
ID: 12442158
can anyone give me some tips
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Accepted Solution

by:
a_twixt_in_the_tale earned 2000 total points
ID: 12442705
0
 

Author Comment

by:SirReadAlot
ID: 12442994
no item demo?
0
 

Author Comment

by:SirReadAlot
ID: 12443053
tHANKS for the link
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question