[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Converting from Excel 2003 to a table XSLT 1.0 (saxon

Subject: Converting from Excel 2003 to a table XSLT 1.0 (saxon 6.5)
From: "Kaila Kaarle" <Kaarle.Kaila@xxxxxxx>
Date: Tue, 26 Jul 2005 11:43:26 +0300
excel 2003 xsl

I am converting an Excel 2003 Table element to an html table element.

Conversion goes OK if all elements have content or even if one set of elements
are empty but if more than one set of elements are empty then I get it wrong.
Can anybody give me good advice on this:

This is how teh Table Row looks like in Excel. First Cell element begins at
column 3 and the 4th Cell element begins at column 7.
<Cell ss:Index="3" ss:StyleID="s25">
<Data ss:Type="String">L1</Data>
<Data ss:Type="String">Eland</Data>
<Data ss:Type="String">se</Data>
<Cell ss:Index="7">
<Data ss:Type="String">Ahvenanmaa</Data>

This is what I have made sofar: It adds correct amount of empty cells for 1st
Cell but I have not figured out how to calculate on what <td> element I am the
next time.

<xsl:template match="ss:Cell">
<xsl:if test="@ss:Index &gt; position()">
<xsl:call-template name="produce-empty-cells">
<xsl:with-param name="count" select="@ss:Index - position()"/>
<xsl:value-of select="ss:Data"/>

<xsl:template name="produce-empty-cells">
<xsl:param name="count"/>
<xsl:if test="$count != 0">
<xsl:call-template name="produce-empty-cells">
<xsl:with-param name="count" select="$count - 1"/>


Kaarle Kaila

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.