Posted By

dscl on 01/14/11


Tagged


Versions (?)

sort


 / Published in: XSLT
 

  1. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  2. <xsl:output method="html" encoding="UTF-8" />
  3. <xsl:template match="content/collection/">
  4. <xsl:apply-templates>
  5. <xsl:sort select="@promotionid" order="descending" data-type="number" />
  6. </xsl:apply-templates>
  7. </xsl:template>
  8.  
  9. <xsl:template match="content/collection/data">
  10. <xsl:if test="position()=1">
  11. <xsl:value-of select="@promotionid"/>
  12. </xsl:if>
  13. </xsl:template>
  14. </xsl:stylesheet>

Report this snippet  

You need to login to post a comment.