Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1570 | - | 1 | <?xml version="1.0" encoding="ISO-8859-1"?> |
2 | <!-- this serves to insert an absolute altitude based on a constant + the pressure height. |
||
3 | Reason: It was omitted to log the GPS altitudes... --> |
||
4 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
||
5 | |||
6 | <xsl:template match="*"> |
||
7 | <xsl:copy> |
||
8 | <xsl:apply-templates select="attribute::*"/> |
||
9 | <xsl:apply-templates/> |
||
10 | </xsl:copy> |
||
11 | </xsl:template> |
||
12 | |||
13 | <xsl:template match="currentPosition"> |
||
14 | <xsl:variable name="height"><xsl:value-of select="../height/@barometric" /></xsl:variable> |
||
15 | <xsl:copy> |
||
16 | <xsl:apply-templates select="attribute::*"/> |
||
17 | <xsl:apply-templates/> |
||
18 | <xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute> |
||
19 | </xsl:copy> |
||
20 | </xsl:template> |
||
21 | |||
22 | <xsl:template match="targetPosition"> |
||
23 | <xsl:variable name="height" select="0"/> |
||
24 | <xsl:copy> |
||
25 | <xsl:apply-templates select="attribute::*"/> |
||
26 | <xsl:apply-templates/> |
||
27 | <xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute> |
||
28 | </xsl:copy> |
||
29 | </xsl:template> |
||
30 | |||
31 | <xsl:template match="homePosition"> |
||
32 | <xsl:variable name="height" select="0"/> |
||
33 | <xsl:copy> |
||
34 | <xsl:apply-templates select="attribute::*"/> |
||
35 | <xsl:apply-templates/> |
||
36 | <xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute> |
||
37 | </xsl:copy> |
||
38 | </xsl:template> |
||
39 | |||
40 | <xsl:template match="attribute::*"> |
||
41 | <xsl:copy> |
||
42 | </xsl:copy> |
||
43 | </xsl:template> |
||
44 | |||
45 | |||
46 | </xsl:stylesheet> |
||
47 |