Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Hierachy menu

From: Jon@-----------.---------.---
To: NULL
Date: 3/1/2005 1:33:00 AM
Hell Joris, this is great thank you.

However, the reason I need a <b> tag is because I need to know which menu 
item was selected. I understand that I'll have to have a param tag which is 
equel to the current page then place a <b> tag around the mneu item that 
represents that page.

thanks,

Jon

"Joris Gillis" wrote:

> Tempore 18:51:04, die Monday 28 February 2005 AD, hinc in foro {microsoft.public.xsl} scripsit Jon <Jon@d...>:
> 
> > Using the below XML, I'd like to output the following style
> >
> > MenuItem1
> > MenuItem2
> >     MenuItem2.1
> >     MenuItem2.1
> > MenuItem3
> > ...
> > and so on.
> >
> > Then around the selected menu item, place a <b> tag.
> Hi,
> 
> I don't really understand when a 'b' tag should be placed, but it's better to avoid it completely and work with CSS.
> 
> This stylesheet builds the menu tree:
> 
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rs="namespace_for_rs" xmlns:z="namespace_for_z" exclude-result-prefixes="rs z">
> <xsl:output indent="yes" />
> 
> <xsl:key name="byID" match="z:row" use="@ParentID"/>
> 
> <xsl:template match="rs:data">
> 	<ul>
> 		<xsl:apply-templates select="key('byID','0')"/>
> 	</ul>
> </xsl:template>
> 
> <xsl:template match="z:row">
> 	<li>
> 		<xsl:value-of select="@PageTitle"/>
> 	</li>
> 	<xsl:if test="key('byID',@PageID)">
> 		<ul><xsl:apply-templates select="key('byID',@PageID)"/></ul>
> 	</xsl:if>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> regards,
> -- 
> Joris Gillis (http://www.ticalc.org/cgi-bin/acct-view.cgi?userid=38041)
> Fiat W3C in tenebris
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent