tags:

views:

108

answers:

0

Hello everyone,

I am using ooxml format for generating excel based sheets from xml data using xslt 2.0. The issues I am running into is . I have a multiple worksheets in xsl:template match as below:

xsl:template match="Detail"

Worksheet ss:Name="D" .... /Worksheet

Worksheet ss:Name="A" ... /Worksheet

Worksheet ss:Name="C" ... /Worksheet

/xsl:template

xsl:template match="NotDetail"

Worksheet ss:Name="B" ... /Worksheet

/xsl:template

End of the day I need to get the worksheets in the alpabetical order in the excel workbook. I am not sure which attribute specification would get me this.

Here is my namespace:

<xsl:template match="/">
  <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:o="urn:schemas-microsoft-com:office:office"
    xmlns:x="urn:schemas-microsoft-com:office:excel"
    xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
    xmlns:html="http://www.w3.org/TR/REC-html40"&gt;

    <xsl:apply-templates select="document(@name)/Detail"/>
    <xsl:apply-templates select="document(@name)/NotDetail"/>
    </xsl:for-each>
    </xsl:template>

Could you please help me.

Thanks, Raja chandra Rangineni