[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: table sort
<David.Pawson@xxxxxxxxxxx> wrote in message news:9B66BBD37D5DD411B8CE00508B69700F049E1705@xxxxxxxxxxxxxxxxxxxxxxxxx > Given a simple table like the one below, > I need to copy it, with the content sorted by the first entry. > > I *thought* it should work using an identity stylesheet, > > with > > <xsl:template match="tbody"> > <tbody> > <xsl:apply-templates> > <xsl:sort select="row/entry[1]/para"/> > </xsl:apply-templates> > </tbody> > </xsl:template> > > but it only works with > <xsl:sort/> > Hi Dave, Probably you wanted: <xsl:template match="tbody"> <tbody> <xsl:apply-templates> <xsl:sort select="entry[1]/para"/> </xsl:apply-templates> </tbody> </xsl:template> Note that the value of the sort key is calculated relative to the selected node. A "row" does not have a "row" child. ===== Cheers, Dimitre Novatchev. http://fxsl.sourceforge.net/ -- the home of FXSL 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
|