Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2005, 11:22 AM
Registered User
 
Join Date: Nov 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I create a menu in xslt?

Hi,

I'm trying to create a menu where the links are based on different subject titles held in an external xml file.

The code needs to step down through the xml file and for every subject page, create a link. I've only managed to get it to read the first entry.

<xsl:variable name="mainSectionName" select="title"/>
<xsl:if test="title = $mainSectionName">
<xsl:variable name="menuItem" select="$mainSectionName"/>
<a href="{$mainSectionUri}"><xsl:value-of select="$menuItem"/></a>
</xsl:if>

At the moment there are only four sections but if the user adds another section, the menu should be updated automatically.

Any help you could give would be greatly appreciated!

Kind regards,
Clare






Similar Threads
Thread Thread Starter Forum Replies Last Post
Create additional drop down menu deean Classic ASP XML 1 June 9th, 2008 01:36 AM
Need help to create expandable menu using tiles cheeky Java GUI 0 April 25th, 2007 03:14 AM
how create menubar, menu, menu item in xsl vijayanmsc XSLT 1 June 5th, 2006 06:43 AM
how can i create menu in JavaScript for client ?? jay4ever_2000 ASP.NET 1.0 and 1.1 Professional 0 February 28th, 2006 08:10 AM
How do I create a jump menu in XSLT? kwilliams XSLT 4 January 9th, 2006 10:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.