xsl-list
[Top] [All Lists]

[xsl] XPath Against OpenXML and OpenOffice Spreadsheets?

2008-06-05 08:51:11
Phil, Slav, ...thank you.  I fail to believe that this is impossible
to do.  I'll stay on it like a houndog, although I know I've been off
in the weeds for the last 4 hours... (embarrassing, but I want you all
to know that I am atleast trying)

I'll work on the sharedStrings.xml file (and related relationships to
map there) later. For now, my goal is to just return ANYTHING!  I
guess the document() function can't get at the subfiles of OpenXML
documents?  That must be why you were saying that it needs to take a
URL starting with zip:///.

I'm already doing this retrieval from Excel with ADO in VB.  It's
super easy.  I just really wanted to be an XML purist.  I'm gonna try
that eXist out.

Here's where I am leaving off for the day...

-----------------------------------------------
c:\Saxon\bin>transform myxml.xml  get-from-excel.xsl
<?xml version="1.0" encoding="UTF-8"?>
        The values are

c:\Saxon\bin>
----------------------------------------------------

myxml.xml
<?xml version="1.0"?>
<excel-data>
        <data>The values are</data>
</excel-data>
-----------------------------------------------------
get-from-excel.xsl
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 xmlns:xs="http://www.w3.org/2001/XMLSchema"; exclude-result-prefixes="xs"
 version="2.0" >
<xsl:variable name="sheet1"
select="document('Book1.xlsx/xl/worksheets/sheet1.xml')"/>

<xsl:template match="/data">
        <xsl:result-document href="excel-data.xml">
                <xsl:value-of select="."/>
                <xsl:value-of select="$sheet1/*"/>
        </xsl:result-document>
</xsl:template>
</xsl:stylesheet>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--