mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Tidy up csv to xml xslt
Use if around the attribute, instead if a choose inside. Its less horrible on the eyes. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5e04aaa756
commit
7e36b4a253
1 changed files with 32 additions and 40 deletions
|
@ -99,49 +99,41 @@
|
|||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
|
||||
<xsl:attribute name="temp">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$tempField >= 0">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$tempField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$tempField >= 0">
|
||||
<xsl:attribute name="temp">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$tempField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:attribute name="po2">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$po2Field >= 0">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$po2Field"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$po2Field >= 0">
|
||||
<xsl:attribute name="po2">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$po2Field"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:attribute name="cns">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$cnsField >= 0">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$cnsField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$cnsField >= 0">
|
||||
<xsl:attribute name="cns">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$cnsField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:attribute name="otu">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$otuField >= 0">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$otuField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:attribute>
|
||||
<xsl:if test="$otuField >= 0">
|
||||
<xsl:attribute name="otu">
|
||||
<xsl:call-template name="getFieldByIndex">
|
||||
<xsl:with-param name="index" select="$otuField"/>
|
||||
<xsl:with-param name="line" select="$line"/>
|
||||
</xsl:call-template>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="$stopdepthField >= 0">
|
||||
<xsl:variable name="stopdepth">
|
||||
|
|
Loading…
Add table
Reference in a new issue