diff options
Diffstat (limited to 'navit/xslt/sailfish_svg.xslt')
| -rw-r--r-- | navit/xslt/sailfish_svg.xslt | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/navit/xslt/sailfish_svg.xslt b/navit/xslt/sailfish_svg.xslt index 63d384a5a..389f474f4 100644 --- a/navit/xslt/sailfish_svg.xslt +++ b/navit/xslt/sailfish_svg.xslt @@ -23,7 +23,7 @@ </xsl:copy> </xsl:template> - <!-- Force all png icons to svg and add w and h if not exist --> + <!-- Force all png icons to svg --> <xsl:template match="icon"> <xsl:copy> <xsl:apply-templates select="@*"/> @@ -36,4 +36,17 @@ </xsl:copy> </xsl:template> + <!-- Force all png icons to svg --> + <xsl:template match="polygon"> + <xsl:copy> + <xsl:apply-templates select="@*"/> + <xsl:if test="@src[substring(., string-length()-3)='.png']|@src[substring(., string-length()-3)='.xpm']"> + <xsl:attribute name="src"> + <xsl:value-of select="concat(substring(@src,1, string-length(@src)-3),'svg')"/> + </xsl:attribute> + </xsl:if> + <xsl:apply-templates select="node()"/> + </xsl:copy> + </xsl:template> + </xsl:stylesheet> |
