I hope this old thread is going to be read ... but my question is related exactly to these filters:
I have been able to install xml filters from the example in this thread: viewtopic.php?f=45&t=3490, so it should not be a general problem of installing an xsl file correctly.
I can chose gpx as a file format and import a gpx file, just the resulting ods file is empty.
Shortened example:
Code: Select all
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<gpx version="1.1" creator="OsmAnd+" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<trkseg>
<trkpt lat="49.8526895" lon="8.6383426">
<ele>136.86</ele>
<time>2017-11-15T21:49:00Z</time>
<hdop>3.0</hdop>
<extensions>
<speed>4.916522979736328</speed>
</extensions>
</trkpt>
</trkseg>
</trk>
</gpx>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!--Repris d'un document généré par ooo 3.0 -->
<xsl:stylesheet
xmlns:defaultns="http://www.topografix.com/GPX/1/1"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0"
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0"
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0"
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0"
xmlns:math="http://www.w3.org/1998/Math/MathML"
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0"
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0"
xmlns:ooo="http://openoffice.org/2004/office"
xmlns:ooow="http://openoffice.org/2004/writer"
xmlns:oooc="http://openoffice.org/2004/calc"
xmlns:dom="http://www.w3.org/2001/xml-events"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rpt="http://openoffice.org/2005/report"
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2"
xmlns:rdfa="http://docs.oasis-open.org/opendocument/meta/rdfa#"
xmlns:field="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:field:1.0"
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
version="1.0">
<!--output trouvé dans le xsl spreadsheet xml -> ods -->
<xsl:output method="xml" encoding="UTF-8" indent="yes"/>
<!--trouvé dans xls gpx2gp -->
<xsl:strip-space elements="*"/>
<!--boucle principale, réalisé une seule fois pour tout le document -->
<xsl:template match="defaultns:gpx">
<office:document>
<office:body>
<office:spreadsheet>
<table:table>
<table:table-row>
<table:table-cell office:value-type="string"><text:p>lat</text:p></table:table-cell>
<table:table-cell office:value-type="string"><text:p>lon</text:p></table:table-cell>
<table:table-cell office:value-type="string"><text:p>ele</text:p></table:table-cell>
<table:table-cell office:value-type="string"><text:p>time</text:p></table:table-cell>
</table:table-row>
<!--appelle le template suivant à cette position car il est interdit de les encastrer -->
<xsl:for-each select="defaultns:trk/defaultns:trkseg/defaultns:trkpt">
<table:table-row>
<table:table-cell><text:p><xsl:value-of select="@lat"/></text:p></table:table-cell>
<table:table-cell><text:p><xsl:value-of select="@lon"/></text:p></table:table-cell>
<table:table-cell><text:p><xsl:value-of select="defaultns:ele"/></text:p></table:table-cell>
<table:table-cell><text:p><xsl:value-of select="defaultns:time"/></text:p></table:table-cell>
</table:table-row>
</xsl:for-each>
</table:table>
</office:spreadsheet>
</office:body>
</office:document>
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<gpx version="1.1" creator="OsmAnd+" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<trkseg>
<trkpt lat="49.849837" lon="8.625592">
<ele>122.86</ele>
<time>2017-11-15T21:44:47Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
Any idea anybody?
Best regards
Joachim
Edit: Split from xslt Filter - by robleyd |