[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Sort by Parameters-Child Nodes
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|