Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 1ad6f3ee authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

changed XSLT transformation to remove namespaces

parent d45a0486
No related branches found
No related tags found
No related merge requests found
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output omit-xml-declaration="no" indent="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="@*|node()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*">
<xsl:attribute name="{name()}"><xsl:value-of select="normalize-space(.)"/></xsl:attribute>
......@@ -11,70 +11,70 @@
<xsl:template match="text()">
<xsl:value-of select="normalize-space(.)"/>
</xsl:template>
<xsl:template match="*[name()='FuelConsumptionMap']">
<xsl:copy>
<xsl:template match="*[local-name()='FuelConsumptionMap']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@engineSpeed" order="ascending"/>
<xsl:sort data-type="number" select="@torque" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='FullLoadAndDragCurve']">
<xsl:copy>
<xsl:template match="*[local-name()='FullLoadAndDragCurve']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@engineSpeed" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='TorqueLossMap']">
<xsl:copy>
<xsl:template match="*[local-name()='TorqueLossMap']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@inputSpeed" order="ascending"/>
<xsl:sort data-type="number" select="@inputTorque" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='RetarderLossMap']">
<xsl:copy>
<xsl:template match="*[local-name()='RetarderLossMap']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@retarderSpeed" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='TorqueLimits']">
<xsl:copy>
<xsl:template match="*[local-name()='TorqueLimits']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@gear" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='Gears']">
<xsl:copy>
<xsl:template match="*[local-name()='Gears']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@number" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='Characteristics']">
<xsl:copy>
<xsl:template match="*[local-name()='Characteristics']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@speedRatio" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
<xsl:template match="*[name()='Axles']">
<xsl:copy>
<xsl:template match="*[local-name()='Axles']">
<xsl:element name="{local-name()}">
<xsl:for-each select="*">
<xsl:sort data-type="number" select="@axleNumber" order="ascending"/>
<xsl:apply-templates select="."/>
</xsl:for-each>
</xsl:copy>
</xsl:element>
</xsl:template>
</xsl:transform>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment