[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Selecting Maximum Values
I'm doing this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/FieldMapLists"> <xsl:for-each select="FieldMapList"> <xsl:sort data-type="number" order="descending" select="sum(StartPos | Size)"/> <xsl:choose> <xsl:when test="position() = 1"> <xsl:value-of select="StartPos + Size"/><br/> </xsl:when> </xsl:choose> </xsl:for-each> </xsl:template> </xsl:stylesheet> I was wondering if there was a simplier way, or is this the way to do it. I'm never sure if I'm doing it the "right" way. :) -- David B. Bitton david@xxxxxxxxxxxxxx Diversa ab illis virtute valemus. Attachment:
pgp00001.pgp
|
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
|