Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] stylesheet templates for OpenOffice spreadsheets

From: Stan <sgd@------------>
To:
Date: 9/1/2005 3:47:00 PM
I've been taking a look at the xml format that the latest OpenOffice
spreadsheets produce and was trying to come up with a generalized
template that would extract the value from the nth row and mth column.

In general, OpenOffice expresses a spreadsheet grid like this (removing
the cruft for illustrative purposes):

<table>
    <row><col>1</col><col>2</col><col>3</col></row>
    <row><col>4</col><col>5</col><col>6</col></row>
    <!-- and so on -->
<table>

A template for this is fairly easy to reproduce because the mth column
of the nth row is just "table/row[n]/col[m]". The problem comes in for
spreadsheet grids that are sparsely or reduntantly filled. In this case,
presumably to save space, the format looks something like this (assuming
the first two columns of the first row are empty):

<table>
    <row><col number-columns-repeated="2"/><col>3</col></row>
    <row><col>4</col><col>5</col><col>6</col></row>
</table>

This makes things much more difficult since now we have to account for
the number-columns-repeated attribute. A generalized approach will now
have to add all the number-columns-repeated values to find the mth column.

I thought that before I started working on producing this, I'd see if
anyone has tackled this before or perhaps there is some magic xpath
statement that eludes me.

StanD.


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent