This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: XML to EXCEL
- From: "klaus e. werner" <werner at vatlib dot it>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 17 Jul 2002 10:48:39 +0200
- Subject: Re: [xsl] XML to EXCEL
- Organization: Biblioteca Apostolica Vaticana
- References: <5.1.0.14.2.20020716095532.0298dc08@mail2.jpl.nasa.gov>
- Reply-to: xsl-list at lists dot mulberrytech dot com
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', '	', 'persname', '	', 'title', '	', 'location', ' ')"/>
<xsl:for-each select="output/record">
<xsl:value-of select="concat(lcn, '	', persname, '	', title, '	', location, ' ')"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Dr. Klaus E. Werner | Biblioteca Apostolica Vaticana
| mailto:werner@vatlib.it
| +39 06 698 79509
From: Mathy V Arumugam <mathy.v.arumugam@jpl.nasa.gov>
Date: Tue, 16 Jul 2002 09:57:31 -0700
Message: <5.1.0.14.2.20020716095532.0298dc08@mail2.jpl.nasa.gov>
Subject: XML to EXCEL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list