[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Filtering menu item based on user click behaviour
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|