Sort value first then output : Sort « XSLT stylesheet « XML

1.CSS Style
3.XML Schema
5.XSLT stylesheet
XML » XSLT stylesheet » Sort 
Sort value first then output

File: Data.xml


  <employee hireDate="04/23/1999">

  <employee hireDate="09/01/1998">

  <employee hireDate="08/20/2000">

File: Transform.xslt
<xsl:stylesheet xmlns:xsl=""
  <xsl:output method="text" />

  <xsl:template match="employees">
      <xsl:sort select="salary" data-type="number" />

  <xsl:template match="employee">
    <xsl:apply-templates select="last" />
    <xsl:apply-templates select="first" />
    <xsl:apply-templates select="salary" />
    Hire Date:
    <xsl:apply-templates select="@hireDate" />







    Hire Date:
    Hire Date:
    Hire Date:

Related examples in the same category
1.sort select="salary" data-type="number" order="descending"
2.Sort by two columns
3.Sort by attribute value
4.Sort by substring
5.sort by different level of node
6.sort element by data type
7.for each sort descending
8.sort with current-grouping-key() function
9.sort by attribute
10.Sort by element text
11.Set sort order as ascending
12.sorts in text
13.sorts in numeric mode.
14.sorts upercase letters first
15.sorts lowercase letters first  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.