[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Creating Hierachial menu

Subject: Creating Hierachial menu
From: "Terry Clark" <tclark@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Jul 2002 16:09:48 +0100
hierachial
Hi

I now found myself as the only developer in my new job and have no one
to bounce problems off - thats where you lot come in

I'm in the proceess of creating a web based image library for our
intranet (All Microsoft based) and all the source data is  coming in
from a csv file that I am converting to XML and transforming with XSLT

I have done simiar things in the past where one of the generated nodes
is a category and using  keys() and generate-id() etc  (the Meunchian?
technique I think they call it) I have created a menu based on these
categories, however this has always been  a top level menu. Now I am
trying to create a multi level menu system and I can't seem to make the
logical leap using the  same approach. Each image can be in more than
one category - hence the duplicate resourceID's in the XML

- <MenuRoot>
- <menu resourceID="2">
  <menuItem hierLevel="1">Ajwa</menuItem> 
  <menuItem hierLevel="2">RMTI</menuItem> 
  </menu>
- <menu resourceID="2">
  <menuItem hierLevel="1">Hardcopy_Available</menuItem> 
  <menuItem hierLevel="2">Photograph</menuItem> 
  </menu>
- <menu resourceID="2">
  <menuItem hierLevel="1">High_Res_CD_Library</menuItem> 
  <menuItem hierLevel="2">AJ/RM_001</menuItem> 
  </menu>
- <menu resourceID="3">
  <menuItem hierLevel="1">Ajwa</menuItem> 
  <menuItem hierLevel="2">RMTI</menuItem> 
  </menu>
- <menu resourceID="3">
  <menuItem hierLevel="1">High_Res_CD_Library</menuItem> 
  <menuItem hierLevel="2">AJ/RM_001</menuItem> 
  </menu>
- <menu resourceID="4">
  <menuItem hierLevel="1">Ajwa</menuItem> 
  <menuItem hierLevel="2">RMTI</menuItem> 
  </menu>
- <menu resourceID="4">
  <menuItem hierLevel="1">Hardcopy_Available</menuItem> 
  <menuItem hierLevel="2">Photograph</menuItem> 
  </menu>
- <menu resourceID="4">
  <menuItem hierLevel="1">High_Res_CD_Library</menuItem> 
  <menuItem hierLevel="2">AJ/RM_001</menuItem> 
  </menu>
- <menu resourceID="5">
  <menuItem hierLevel="1">Ajwa</menuItem> 
  <menuItem hierLevel="2">Nabati</menuItem> 
  </menu>
- <menu resourceID="5">
  <menuItem hierLevel="1">Hardcopy_Available</menuItem> 
  <menuItem hierLevel="2">Transparency</menuItem> 
  </menu>
- <menu resourceID="5">
  <menuItem hierLevel="1">High_Res_CD_Library</menuItem> 
  <menuItem hierLevel="2">AJ/NA_001</menuItem> 
  </menu>
- <menu resourceID="6">
  <menuItem hierLevel="1">Hardcopy_Available</menuItem> 
  <menuItem hierLevel="2">Transparency</menuItem> 
  </menu>
- <menu resourceID="6">
  <menuItem hierLevel="1">High_Res_CD_Library</menuItem> 
  <menuItem hierLevel="2">JAD/DORAD_F_002</menuItem> 
  </menu>
- <menu resourceID="6">
  <menuItem hierLevel="1">Jadawel</menuItem> 
  <menuItem hierLevel="2">DorratAlJadawel_F_Riyadh</menuItem> 
  <menuItem hierLevel="3">Accomodation</menuItem> 
  </menu> ......

so far it is over 1000 images and what I would like to do is turn the
above XML into a menu for navigation that filters down  to the desired
images something along the lines of

Ajwa
    RMTI
    Nabati
Jadawel
    DorratAlJadawel_F_Riyadh
        Accomodation
        External
High_Res_CD_Library
    AJ/NA_001
    AJ/RM_001
Hardcopy_Available
    Transparency
    Photograph
    JAD/DORAD_F_002


etc etc

There is no logical limit on the number of sub levels but in reality
should not be more than 5 or 6

At the moment I am having a complete brain blank on any inspiration on
this one .
Would I be better off creating a different XML structure or can I do
what I am trying to do with this structure ?

Any tips, pointers or even a solution :-) would be much appreciated

TIA

Terry

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.