5 Replies Latest reply on Apr 10, 2012 3:26 AM by Rupesh Gaikwad

    BAO - difficulty in sort function

      Hi,

      I am trying to sort below output from BAO sort function from xslt.

      <result>

        <field name="Identified Item">CCCC.COM</field>

        <field name="Identified Item">BBBB.COM</field>

        <field name="Identified Item">XXXX.TIETO.COM</field>

        <field name="Identified Item">DDDD.COM</field>

      </result>

       

       

      I am using xslt as :

      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

        <xsl:output indent="no" />

        <xsl:template match="/">

          <field>

            <xsl:for-each select="//result/field">

              <xsl:sort select="//field" order="ascending" case-order="upper-first" />

            </xsl:for-each>

          </field>

        </xsl:template>

      </xsl:stylesheet>

       

      Not sure how will it give me output as:

      <result>

        <field name="Identified Item">BBBB.COM</field>

        <field name="Identified Item">CCCC.COM</field>

        <field name="Identified Item">DDDD.COM</field>

        <field name="Identified Item">XXXX.TIETO.COM</field>

      </result>

       

      Your comments are welcome!

       

       

      Best regards,

      Rupesh