Re: [xsl] XML to EXCEL

Subject: Re: [xsl] XML to EXCEL
From: "klaus e. werner" <werner@xxxxxxxxx>
Date: Wed, 17 Jul 2002 10:48:39 +0200
        
        Wednesday, 07 July 2002 at 10:04
        
        For an input XML like:
        
        <?xml version="1.0" encoding="UTF-8"?>
        <?xml-stylesheet type="text/xsl" href="xhtml.xsl"?>
        <output version="0.3" records="9">
                <record number="1">
                        <lcn>10071242</lcn>
                        <persname>Aeneas Tacticus,  (sec. IV a.C)</persname>
                        <title>Aeneas Tacticus, Asclepiodotus, Onasander.</title>
                        <location>Lett.Gr.Ant.1.10.AeneasTacticus.Cons.</location>
               </record>
               <record>
                        <...>
               </record>
        </output>
        
        You will have to write something along these lines:
        
        <?xml version="1.0" encoding="UTF-8"?>
        <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="text" encoding="UTF-8" indent="yes" />

        <xsl:strip-space elements="*" />

        <xsl:template match="/">
                <xsl:value-of select="concat('lcn', '&#9;', 'persname', '&#9;', 'title', '&#9;', 'location', '&#13;')"/>

                <xsl:for-each select="output/record">
                <xsl:value-of select="concat(lcn, '&#9;', persname, '&#9;', title, '&#9;', location, '&#13;')"/>
                </xsl:for-each>
        </xsl:template>
        </xsl:stylesheet>
        
        
        
        Dr. Klaus E. Werner | Biblioteca Apostolica Vaticana
                            | mailto:werner@xxxxxxxxx
                            | +39 06 698 79509

        From: Mathy V Arumugam <mathy.v.arumugam@xxxxxxxxxxxx>
        Date: Tue, 16 Jul 2002 09:57:31 -0700
        Message: <5.1.0.14.2.20020716095532.0298dc08@xxxxxxxxxxxxxxxxxx>
        Subject: XML to EXCEL
        


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread