|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Parameterized sort
Hi Kim, > I have the following sort problem where I want to have the > sort key defined > as a parameter. ... > <document> > <row><column name="FirstName">John</column> > <column name="LastName">Doo</column> > </row> > <row><column name="FirstName">Alice</column> > <column name="LastName">Mulcaster</column> > </row> ... > <xsl:sort select="column[@name=*[name()=$sortByColumn]]"/> Your problem is that you are trying to treat the attribute value as if it were an element, and using the wildcard and name() functions. You are overcomplicating things: all you need to do is sort by the column element whose name attribute value (a string) equates to the parameter (another string); this is a simple comparison. Just try <xsl:sort select="column[@name=$sortByColumn]"/> Hope that helps, Stuart XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








