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

Sort by Parameters-Child Nodes

Subject: Sort by Parameters-Child Nodes
From: Bret <laker_66@xxxxxxxxx>
Date: Thu, 29 Apr 2004 06:38:28 -0700 (PDT)
xsl sort by date
Hi!!
I have the following sample XSL which i'm trying to
modify for Sorting based on parameters .
I'm able to sort by DATE,TIME fields as seen below but
not PERSON/FNAME or PERSON/LNAME 
when i pass them as parameters . 
I'm pretty sure i'm missing something in "template
match" or "sort select" .Can anbody please point me 
in the right direction .

Thanks!!!

SAMPLE XML:

<ABC>
<DATE>2006-09-19T20:12:15</DATE>
<TIME>20:12:15</TIME>
<PERSON><FNAME>joe</FNAME><LNAME>joe</LNAME></PERSON>
</ABC>

SAMPLE XSL:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xml:space="preserve">
<xsl:param name="pa"/>
<xsl:param name="pas"/>

<xsl:template match="/">

<xsl:for-each select = "//ABC">

<xsl:sort select="*[name()=$pa]"  order="{$pas}"/>
<xsl:value-of select="DATE"/>
<xsl:value-of select="TIME"/>
<xsl:value-of select="PERSON/LNAME"/>
<xsl:value-of select="PERSON/FNAME"/>
</xsl:for-each>

</xsl:template> 

</xsl:stylesheet>



	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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.