XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
pankaj beniwalSubject: Hyperlink in xsl
Author: pankaj beniwal
Date: 17 Aug 2006 01:30 AM
Following is my XML document.

<root>
<page>2</page>
<totalPage>7</totalPage>
</root>

and i want the output in following manner...
1 [2] 3 4 5 6 7

all the values except 2,which is the value of page, should be hyperlinked. When one click on any of value then series become change suppose.. one click on 4 then output should be in follwing manner..
1 2 3 [4] 5 6 7
except 4 all should be hyper link.


followin is not workin when i click on hyperlink...[suppose init values are pageValue = 2, noOfPage=7 and count = 1 ]
-----------------------------------------------------
<xsl:template name="PageCount">
<xsl:param name="pageValue"/>
<xsl:param name="noOfPage"/>
<xsl:param name="count"/>
<xsl:choose>
<xsl:when test="$noOfPage > $count ">
<xsl:choose>
<xsl:when test="$count = $pageValue">
<xsl:value-of select="$count"/>
</xsl:when>
<xsl:otherwise>
<a href="{$count}">
<xsl:value-of select="$count"/>
</a>
<xsl:value-of select="' '"/>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="PageCount">
<xsl:with-param name="pageValue" select="Page"/>
<xsl:with-param name="noOfPage" select="NoOfPage"/>
<xsl:with-param name="count" select="$count + 1"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$pageValue= $noOfPage">
<xsl:value-of select="$count"/>
</xsl:when>
<xsl:otherwise>
<a href="{$count}"> <xsl:value-of select="$count"/>
</a>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

-----------------------------------------------------

Posttop
Tony LavinioSubject: Hyperlink in xsl
Author: Tony Lavinio
Date: 17 Aug 2006 07:56 AM
Please do not cross-post.
You posted this already in "XSLT Help and Discussion"

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.