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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + How to sum the values (2)
-> + Grouping nodes between like no... (3)
-> - Group and display the min valu... (1)
-> + Creating a XML document with n... (4)
-> + Remove duplicates - different ... (2)
-> + Remove duplicates in a list - ... (3)
-> + Sort before paging (4)
-> + Min template (11)
-> + Recursion Help (2)
-> + Help needed with XSLT / XPATH (4)
-> + Axis (6)
-> + Carriage return / line feed (4)
-> + Adding a level with repeating ... (2)
-> + Group by function (2)
-> + xsl variable problems (simple) (10)
-> + XSLT Conditional Statements (2)
-> + XPST0003: XPath syntax error (3)
-> - myspace (1)
-> + XSLT to XML: Urgent Help Neede... (7)
-> - hyperlink in xslt (2)
-> ->hyperlink in xslt
-> + Add Condition check in a multi... (3)
-- Previous [1381-1400] [1401-1420] [1421-1440] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
pankaj beniwalSubject: hyperlink in xslt
Author: pankaj beniwal
Date: 17 Aug 2006 01:35 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 xslt
Author: Tony Lavinio
Date: 17 Aug 2006 07:59 AM
Which version of Stylus Studio are you using, so we know
how best to answer your question?
(Remember you are using the Stylus Studio Developer Network, a
free resource to Stylus Studio users only.)

   
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.