[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Get the first Array element

Subject: Re: Get the first Array element
From: henry human <henry_human@xxxxxxxx>
Date: Fri, 11 May 2012 12:24:27 +0100 (BST)
Re:  Get the first Array element
If I have it in this way in the otherwise part I get for that Taxtotal which
HAS NO Amount still a result 
(<amount>00000000000000</amount>)
Therfore I did
:
  <xsl:otherwise></xsl:otherwise>
The solution works fine for me, thnak you
guys!
But I think still this statement : <xsl:when
test="cac:TaxTotal[child::cbc:Amount][1]/cbc:Amount 

does not query ONLY the
taxtotal elemnets which HAS AN amount but the other taxtotals too?
Kind regards
hny

----- Urspr|ngliche Message -----
Von: Michel Hendriksen
<michel.hendriksen@xxxxx>
An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
CC: 
Gesendet:
12:27 Freitag, 11.Mai 2012
Betreff: Re:  Get the first Array element
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 &gt;= 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 &lt; 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>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.