472,143 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,143 software developers and data experts.

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?

Jul 27 '06 #1
2 1035


Wang Xiaoning wrote:

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/
Jul 28 '06 #2
thanks, it works perfect.

Jul 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Eric W. Holzapfel | last post: by
22 posts views Thread by Jonathan Snook | last post: by
4 posts views Thread by crhaynes | last post: by
6 posts views Thread by SeaPlusPlus | last post: by
8 posts views Thread by Andrew Phillipo | last post: by
12 posts views Thread by prashant | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.