Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / July 2006

Tip: Looking for answers? Try searching our database.

link to other page from xsl

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wang Xiaoning - 27 Jul 2006 22:37 GMT
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?
Martin Honnen - 28 Jul 2006 17:10 GMT
> 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.

Signature

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/

Wang Xiaoning - 28 Jul 2006 19:13 GMT
thanks, it works perfect.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.