[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Passing Parameters to XSL

Subject: Passing Parameters to XSL
From: Riju Abraham <R.Abraham@xxxxxxxxxxxx>
Date: Sat, 17 Jan 2004 10:02:50 +0300
passing parameters to xsl
 
   Hi All,
     Does any one have an aspx code to pass a parameter to an XSL 

I am hereby giving My XML and XSl ....I want to perform a dynamic sorting
depending on which Col Header the User clicks.
I am new to please.Please do help with all suggetsions.If any body has the
aspx code also please do forward it.

Thanks in advance..


<xsl:transform version="1.0"
    xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
    xmlns:msxsl ="urn:schemas-microsoft-com:xslt">    
    <xsl:output method="html"></xsl:output>         
    <xsl:param name ="sortBy">country</xsl:param>
    <xsl:template match="/"> 
    <html>
    <body>
    <div align ="left">
     Sort By:       
       <xsl:value-of select="$sortBy"></xsl:value-of>
    </div>   
    <table width="210" border="2pt" cellspacing="0" cellpadding="3" 
	bordercolor="#dddddd" style="border-collapse:collapse;">	
	<tr bgcolor="#9acd32">		
		<th align="Left"><a class="clickanchor"
onclick="ClickedMe('Country');" >Country</a></th>        
		<th align="Left"><a class="clickanchor"
onclick="ClickedMe('AreaCode');" >AreaCode</a></th> 
		<th align="Left"><a class="clickanchor"
onclick="ClickedMe('AreaDescription');">AreaDescription</a></th>

	</tr>	
	
	<xsl:for-each  select ='locations/area'>	
	<xsl:sort select="areadescription"/>
		<tr>			
			<td class="Normal">
				<center>
					<xsl:value-of select ='country'/>
				</center>
			</td>
			<td class="Normal">
				<center>
					<xsl:value-of select ='areacode'/>
				</center>
			</td>
			<td class="Normal">
				<left>
					<xsl:value-of select
='areadescription'/>
				</left>
			</td>
		</tr>
	</xsl:for-each>
      </table>
      </body>
      </html>
      </xsl:template>
</xsl:transform>





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

<?xml version="1.0" ?>
<locations>
    <area>
        <country>KSA</country>
        <areacode>A</areacode>
        <areadescription>ABHA AREA
</areadescription>
    </area>
    <area>
        <country>KSA</country>
        <areacode>D</areacode>
        <areadescription>DHAHRAN AREA
</areadescription>
    </area>
    <area>
        <country>KSA</country>
        <areacode>F</areacode>
        <areadescription>TAIF AREA
</areadescription>
    </area>
    <area>
        <country>KSA</country>
        <areacode>H</areacode>
        <areadescription>HARADH AREA
</areadescription>
    </area>
    <area>
        <country>KSA</country>
        <areacode>J</areacode>
        <areadescription>JEDDAH AREA
</areadescription>
    </area>
</locations>




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.