summaryrefslogtreecommitdiff
path: root/navit/xslt/sailfish_gui.xslt
blob: 2f2c8fd02751b1afc4419ee9414d937e99f56105 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:xi="http://www.w3.org/2001/XInclude">

	<xsl:output method="xml" indent="yes" cdata-section-elements="gui" doctype-system="navit.dtd"/>

   <!-- Default rule: copy all -->
   <xsl:template match="node()|@*">
      <xsl:copy>
         <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
   </xsl:template>

   <xsl:template match="/config/navit">
      <xsl:copy>
         <xsl:apply-templates select="@*"/>
         <xsl:attribute name="drag_bitmap">1</xsl:attribute>
         <xsl:apply-templates select="node()"/>
      </xsl:copy>
   </xsl:template>

   <xsl:template match="/config/navit/gui[@type='internal']">
      <xsl:copy>
         <xsl:apply-templates select="@*"/>
         <xsl:attribute name="font_size">350</xsl:attribute>
         <xsl:attribute name="icon_xs">32</xsl:attribute>
         <xsl:attribute name="icon_s">96</xsl:attribute>
         <xsl:attribute name="icon_l">96</xsl:attribute>
         <xsl:attribute name="enabled">yes</xsl:attribute>
         <xsl:apply-templates select="node()"/>
      </xsl:copy>
   </xsl:template>

</xsl:stylesheet>