Subject: Re: Get the first Array element
From: Michel Hendriksen <michel.hendriksen@xxxxx>
Date: Fri, 11 May 2012 12:27:40 +0200
|
First test had a space it seems, so never matched
So something like: (second part not needed I guess, test might better)
<xsl:choose>
<xsl:when test="cac:TaxTotal[child::cbc:Amount][1]/cbc:Amount >= 0">
<xsl:value-of
select="format-number(floor(cac:TaxTotal[child::cbc:Amount][1]/cbc:Amount),'+0000000000000;-0000000000000')
"/>
</xsl:when>
<xsl:when test="cac:TaxTotal[child::cbc:Amount][1]/cbc:Amount < 0">
<xsl:value-of
select="format-number(floor(cac:TaxTotal[child::cbc:Amount][1]/cbc:Amount),'+0000000000000;-0000000000000')
"/>
</xsl:when>
<xsl:otherwise>00000000000000</xsl:otherwise>
</xsl:choose>
|