xsl-list
[Top] [All Lists]

RE: Passing in a node value

2003-04-21 12:15:37
First you have to come up with the html structures that you want to use.
Then you can work out how to create them.  As for id values, you can
always concatenate the menu names as you construct the source xml, or do
it programatically -

id='root_item_sub_item1_sub_sub_item1'
 
That should be enough to let you identify them. 

Cheers,

Tom P

[ Gregory Propf ]

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



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



<Prev in Thread] Current Thread [Next in Thread>