[xsl] Passing in a node value

Subject: [xsl] Passing in a node value
From: Gregory Propf <gpropf@xxxxxxxxxx>
Date: Sun, 20 Apr 2003 15:50:56 -0400
I am trying to create an XML-XSL based menu system for a website. I want to be able to designate some menu items as "expanded" and others as not. The idea is that a user clicks a menu link and the frame reloads with that menu node expanded to show the subitems. I have XML that looks like this.

<?xml version="1.0" encoding="UTF-8"?>
<Menuitem Name="Root_item" expanded="false">
<Menuitem Name="sub_item1" expanded="false">subitem1</Menuitem>
<Menuitem Name="sub_item2" expanded="false">subitem2</Menuitem>
<Menuitem Name="sub_item3" expanded="false">subitem3</Menuitem>
<Menuitem Name="sub_item4" expanded="false">subitem4
<Menuitem Name="sub_sub_item1" expanded="false">sub_sub_item1</Menuitem>
<Menuitem Name="sub_sub_item2" expanded="false">sub_sub_item2</Menuitem>
<Menuitem Name="sub_sub_item3" expanded="false">sub_sub_item3</Menuitem>
</Menuitem>
</Menuitem>


The idea is that I want to set the expanded values to true dynamically as people hit the site and want to see the subnodes. I'll probably be using Xalan called from a servlet (Java). I initially thought I could just create a hash with node names as keys. Apparently XSL doesn't support hashes though. Anyone know how to do this or something that will be equivalent. Also Can anyone recommend a good xsl-xpath reference, preferable free and online.


--
"Firing people can give you a pretty good buzz, but it's a poor, poor substitute for killing. I realize that now" - Dale Gribble



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



Current Thread