This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Filtering menu item based on user click behaviour
- To: XSL-List at mulberrytech dot com
- Subject: Filtering menu item based on user click behaviour
- From: Sehat <obral100 at yahoo dot com>
- Date: Wed, 23 Feb 2000 08:31:08 -0800 (PST)
- Reply-To: xsl-list at mulberrytech dot com
Hello
I would like to design menu pages that when the user
click on
one of the category items,
URL that user will click on
<catTitleUrl>javascript:sort('category[@title =
\'Technologies\']',
'title') </catTitleUrl>
it will bring another new subject menu but the same
category menu on the
same pages with subject related to those category
items.
In my XSL file, I have been able to filter out
Category staticly in
<xsl:if test="title[.='Technologies']">
As I browse all message, solution like this
"{./@name}"
seems will work. But I have no idea do it.
I have read throught
http://msdn.microsoft.com/xml/xslguide/xsl-xform-filter.asp
any comment is welcome
thank you
sehat
================== xsl file ======================
<?xml version="1.0"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match='/'>
<tr></tr>
<table width="800" bgcolor="#FFFFFF" border="0"
cellspacing="0"
cellpadding="2">
<xsl:for-each select="portal/category">
<a class="menuhead">
<xsl:attribute name="href">
<xsl:value-of select="catTitleUrl"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</xsl:for-each>
</table>
<table width="800" bgcolor="#FFFFFF" border="0"
cellspacing="0"
cellpadding="2">
<xsl:for-each select="portal/category">
<xsl:if test="title[.='Technologies']">
<xsl:for-each select="subject">
<a class="menuitem">
<xsl:attribute name="href">
<xsl:value-of select="url"/>
</xsl:attribute>
<xsl:value-of select="title"/></a>
</xsl:for-each>
</xsl:if>
<P></P>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
================================================================
============== XML file ===============
<?xml version="1.0"?>
<portal>
<category>
<title>Technologies</title>
<catTitleUrl>javascript:sort('category[@title =
\'Technologies\']',
'title') </catTitleUrl>
<description>Technologies, Tools, Languages of
interest</description>
<subject>
<title>ASP</title>
<url>twocol.asp?xmlsrc=../xml/aspContent.xml</url>
</subject>
<subject>
<title>DHTML</title>
<url>onecol.asp?xmlsrc=../xml/dhtmlContent.xml</url>
</subject>
<subject>
<title>Java</title>
<url>onecol.asp?xmlsrc=../xml/JavaContent.xml</url>
</subject>
</category>
<category>
<title>Applications</title>
<catTitleUrl># </catTitleUrl>
<description>Industry applications</description>
<subject>
<title>Call Center</title>
<url>#</url>
</subject>
<subject>
<title>Claims Processing</title>
<url>#</url>
</subject>
</category>
</portal>
=================================================
ps. (sample come from asptoday)
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list