p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > XML > XSLT
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 24th, 2004, 10:59 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Site navigation

Im trying to make dynamic site navigation (multi-depth) with xsl, but are having some problems. The xml source is generated adPersistXML from a sql database as follows:

<xml>
<s:schema>
......
</s:schema>
<rs:data>
  <z:row PageID="1000" ParentID="0" MenuOrder="1" MenuLabel="Frontpage" />
  <z:row PageID="1001" ParentID="1000" MenuOrder="1" MenuLabel="Products" />
  <z:row PageID="1004" ParentID="1000" MenuOrder="2" MenuLabel="Contact" />
  <z:row PageID="1005" ParentID="1000" MenuOrder="3" MenuLabel="About" />
  <z:row PageID="1003" ParentID="1001" MenuOrder="1" MenuLabel="Car" />
  <z:row PageID="1002" ParentID="1001" MenuOrder="2" MenuLabel="House" />
  <z:row PageID="1008" ParentID="1002" MenuOrder="1" MenuLabel="House 1" />
  <z:row PageID="1009" ParentID="1002" MenuOrder="2" MenuLabel="House 2" />
  <z:row PageID="1006" ParentID="1003" MenuOrder="1" MenuLabel="Car 1" />
  <z:row PageID="1007" ParentID="1003" MenuOrder="2" MenuLabel="Car 2" />
</rs:data>
</xml>

As u can see it do not have the depth of the page stored in the database, so I want to determine the depth with xsl at the same time that I display the data.

Lets say that the current PageID is 1006 (Car 1) I want the XSL or rather HTML output to be like this

Products
  Car
  * Car 1
    Car 2
  House
Contact
About

The MenuOrder determines the siblings order.

To be able to do this I think I would have to determine the depth of the pages and also do a check if page is active or open. In this example the page "Car" (PageID=1003) is open, but not active. The children of the page "House" (PageID=1002) is not visible since its not open.

Each page therefore must be stored in a <div> with a css style class attribute, like class="Level2Open1Active1". The values in the classname should be dynamically produced by parameters from the xsl.

I hope there is someone out there that could help me with this one.
Thanx in advance!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Site Navigation aspcoder BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 14 May 24th, 2008 06:40 PM
navigation in a web site..... mallikalapati ASP.NET 2.0 Professional 3 February 11th, 2008 12:06 PM
how to add breadcrumb navigation to a LAMP site avail1now PHP How-To 0 February 17th, 2006 05:03 PM
how do i change the site icon on a geocitiies site uprocker2 HTML Code Clinic 2 March 4th, 2005 07:20 AM
Site navigation stu9820 ASP.NET 1.0 and 1.1 Basics 7 December 1st, 2003 06:03 PM



All times are GMT -4. The time now is 11:23 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc