Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Hierachy menu [Thread Next] Re: Hierachy menuTo: 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
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
