Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 27th, 2006, 10:35 PM
Wang Xiaoning
Guest
 
Posts: n/a
Default link to other page from xsl

Hi, i have the following xsl file
----------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="FirstLetter"></xsl:param>

<xsl:template match="customerlist">
<html>
<body>
<table border="1" frame="box">
<tr>
<TH>Customer</TH>
<TH>Number</TH>
<TH>Address</TH>
</tr>
<xsl:for-each select="mag_customer[substring(@customer,1,1) =
$FirstLetter]">
<tr>
<td>
<xsl:value-of select="@customer"/>
</td>
<td>
<xsl:value-of select="@customer_number"/>
</td>
<td>
<xsl:value-of select="@address"/>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>
------------------------------------------------------------------------------------------------------------

what i want from this file is to ref to another page, so if user
clicked "customer" filed, it will go to the selected customer detail
information page. can i do this?

  #2  
Old July 28th, 2006, 05:05 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: link to other page from xsl



Wang Xiaoning wrote:

Quote:
what i want from this file is to ref to another page, so if user
clicked "customer" filed, it will go to the selected customer detail
information page. can i do this?
Your XSLT stylesheet generates a HTML document, so simply make it
generate a HTML document with a HTML link e.g.
<a href="showDetails.aspx?customer_number={@customer_ number}">
<xsl:value-of select="@customer_number"/>
</a>
Of course you need to implement showDetails.aspx then.


--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
  #3  
Old July 28th, 2006, 07:05 PM
Wang Xiaoning
Guest
 
Posts: n/a
Default Re: link to other page from xsl

thanks, it works perfect.

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles