0,0 → 1,47 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
<!-- this serves to insert an absolute altitude based on a constant + the pressure height. |
Reason: It was omitted to log the GPS altitudes... --> |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
<xsl:template match="*"> |
<xsl:copy> |
<xsl:apply-templates select="attribute::*"/> |
<xsl:apply-templates/> |
</xsl:copy> |
</xsl:template> |
|
<xsl:template match="currentPosition"> |
<xsl:variable name="height"><xsl:value-of select="../height/@barometric" /></xsl:variable> |
<xsl:copy> |
<xsl:apply-templates select="attribute::*"/> |
<xsl:apply-templates/> |
<xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute> |
</xsl:copy> |
</xsl:template> |
|
<xsl:template match="targetPosition"> |
<xsl:variable name="height" select="0"/> |
<xsl:copy> |
<xsl:apply-templates select="attribute::*"/> |
<xsl:apply-templates/> |
<xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute> |
</xsl:copy> |
</xsl:template> |
|
<xsl:template match="homePosition"> |
<xsl:variable name="height" select="0"/> |
<xsl:copy> |
<xsl:apply-templates select="attribute::*"/> |
<xsl:apply-templates/> |
<xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute> |
</xsl:copy> |
</xsl:template> |
|
<xsl:template match="attribute::*"> |
<xsl:copy> |
</xsl:copy> |
</xsl:template> |
|
|
</xsl:stylesheet> |
|