xml - Need to create multiple excel .xls file using XSLT -


the following sample xml file

<?xml version="1.0"?> <mt_test_in> <record>   <name>aashish</name>   <age>25</age>   <place>chennai</place> </record> <record>   <name>satheesh</name>   <age>25</age>   <place>coimbatore</place> </record> </mt_test_in>   

i need 2 excel files based on text of name element.

<?xml version="1.0" encoding="utf-8"?> <?mso-application progid="excel.sheet"?> <xsl:stylesheet version="1.0" xmlns:html="http://www.w3.org/tr/rec-html40" xmlns:xsl="http://www.w3.org/1999/xsl/transform" 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"> <xsl:template match="/"> <workbook>   <styles>     <style ss:id="default" ss:name="normal">       <alignment ss:vertical="bottom" />       <borders />       <font />       <interior />       <numberformat />       <protection />     </style>     <style ss:id="s21">       <font ss:size="22" ss:bold="1" />     </style>     <style ss:id="s22">       <font ss:size="14" ss:bold="1" />     </style>     <style ss:id="s23">       <font ss:size="12" ss:bold="1" />     </style>     <style ss:id="s24">       <font ss:size="10" ss:bold="1" />     </style>   </styles>   <worksheet ss:name="page1">     <table>       <xsl:call-template name="xmltoxsl" />     </table>    </worksheet>   </workbook>   </xsl:template>   <xsl:template name="xmltoxsl">   <row ss:index="1" >   <cell>     <data ss:type="string">name</data>   </cell>    <xsl:for-each   select="//record">     <cell ss:index="2">       <data ss:type="string">         <xsl:value-of select="name" />       </data>     </cell>     </xsl:for-each>     </row>    <row ss:index="2" >   <cell>     <data ss:type="string">place</data>   </cell>   <xsl:for-each  select="//record">     <cell ss:index="2">       <data ss:type="string">         <xsl:value-of select="place" />       </data>     </cell>   </xsl:for-each> </row> </xsl:template> <xsl:template match="datalist"> </xsl:template> </xsl:stylesheet> 

i want 2 excel files based on value of "name" element. on 1 excel file details name "aashish" , on excel file "satheesh". not separate sheet. need separate excel files.

kindly me issue.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -