I have been creating an XSL file to use as a filter to translate a table from a Calc document an xml document that is easier (and smaller) to consume in another application. The problem being my XPath queries don't seem to be working in OO. They work fine using JEdit and oXygen XML editors and XSLT engines using the contents of the content.xml file that is zipped in the .odf file. To try and figure out what was going on I wrote a very small XSL file to see if I could get that to work, and it does not. Is what I am trying to do even possible in OpenOffice Calc?
Any an all help will be greatly appreciated. Thank you for your time.
David
XSL file:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" >
<xsl:strip-space elements="*" />
<xsl:output method="html" standalone="yes" indent="yes" />
<xsl:template match="/">
<html>
<body>
<p>what - <xsl:value-of select="/office:document-content/office:body/office:spreadsheet/table:table[1]/@table:name" /></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<html xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0">
<body>
<p>what - Incidents</p>
</body>
</html>
Code: Select all
<html xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">
<body>
<p>what - </p>
</body>
</html>