You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2001/03/25 22:55:23 UTC
[Bug 1109] New - Bug in xsl:value-of select="format-number(pos_price, '#,##0.0000')"/>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1109
*** shadow/1109 Sun Mar 25 12:55:23 2001
--- shadow/1109.tmp.10622 Sun Mar 25 12:55:23 2001
***************
*** 0 ****
--- 1,262 ----
+ +============================================================================+
+ | Bug in xsl:value-of select="format-number(pos_price, '#,##0.0000')"/> |
+ +----------------------------------------------------------------------------+
+ | Bug #: 1109 Product: XalanJ2 |
+ | Status: NEW Version: 2.0.0 |
+ | Resolution: Platform: All |
+ | Severity: Critical OS/Version: All |
+ | Priority: High Component: org.apache.xalan.transf |
+ +----------------------------------------------------------------------------+
+ | Assigned To: xalan-dev@xml.apache.org |
+ | Reported By: wzbkav@rzb.at |
+ | CC list: Cc: |
+ +----------------------------------------------------------------------------+
+ | URL: |
+ +============================================================================+
+ | DESCRIPTION |
+ The following xsl-Definition throws an exception on transformation:
+
+ <xsl:value-of select="format-number(pos_price, '#,##0.0000')"/>
+
+ XML-File:
+ <?xml version="1.0" encoding="ISO-8859-1"?>
+ <?xml-stylesheet href="position.xsl" type="text/xmsl"?>
+ <Database>
+ <Position>
+ <dep_nr>62000013000</dep_nr>
+ <pos_qty>9568.00000000</pos_qty>
+ <fi_key>85954</fi_key>
+ <fi_isin>AT0000859541</fi_isin>
+ <fi_short>RAIFF.-EURO-LIQUID (A)</fi_short>
+ <pos_price_cur>EUR</pos_price_cur>
+ <pos_price>70.60000000</pos_price>
+ <pos_market_value_h>675500.80</pos_market_value_h>
+ <waehrung>EUR</waehrung>
+ <exc_code/>
+ </Position>
+
+ XSL-File:
+ ---------
+ <?xml version="1.0" encoding="ISO-8859-1" ?>
+ <!DOCTYPE xsl:stylesheet [
+ <!ENTITY nbsp " ">
+ <!ENTITY anfz """>
+ ]>
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <xsl:output method="xml" version="1.0" encoding="UTF-8"
+ omit-xml-declaration="no" indent="yes" media-type="text/html"/>
+ <xsl:variable name="leer">"</xsl:variable>
+ <xsl:variable name="format">#,#00.00</xsl:variable>
+ <xsl:template match="Database">
+ <html>
+ <link rel="stylesheet" type="text/css"
+ href="http://fujitsu/rzbicse/css/rzbics.css"/>
+ <body>
+ <table border="0" width="100%">
+ <tr>
+ <td align="center"
+ class="tabtitle">Statement of holdings</td>
+ </tr>
+ </table>
+ <table cellspacing="0" cellpadding="0"
+ border="1" hspace="10" width="100%">
+ <tr class="rzbblue">
+ <td>
+ <span
+ class="tabtext-h"> Depot</span>
+ </td>
+ <td align="right">
+ <span
+ class="tabtext-h">Shs/Nom</span>
+ </td>
+ <td>
+ <span
+ class="tabtext-h"> Ident</span>
+ </td>
+ <td>
+ <span
+ class="tabtext-h"> ISIN</span>
+ </td>
+ <td>
+ <span
+ class="tabtext-h"> Security name</span>
+ </td>
+ <td>
+ <span
+ class="tabtext-h"> Curr.</span>
+ </td>
+ <td align="right">
+ <span
+ class="tabtext-h">Quote</span>
+ </td>
+ <td align="right">
+ <span
+ class="tabtext-h">Market Value</span>
+ </td>
+ <td>
+ <span
+ class="tabtext-h"> Curr.</span>
+ </td>
+ <td>
+ <span
+ class="tabtext-h"> Exchange</span>
+ </td>
+ </tr>
+ <xsl:apply-templates/>
+ </table>
+ Number of Positions: <xsl:value-of select="count (Position)"/>
+ <p/>
+ </body>
+ </html>
+ </xsl:template>
+ <xsl:template match="Total">
+ <tr>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td> </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="summe"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="waehrung"/>
+ </span>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="Position [position ( ) mod 2 = 1]">
+ <tr class="lightyellow">
+ <td>
+ <span class="text"> <xsl:value-of
+ select="dep_nr"/>
+ </span>
+ </td>
+ <td align="right">
+ <span class="text">
+ <xsl:value-of select="pos_qty"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="fi_key"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="fi_isin"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="fi_short"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="pos_price_cur"/>
+ </span>
+ </td>
+ <td align="right">
+ <span class="text">
+ <xsl:if test="string(pos_price)">
+ <xsl:value-of
+ select="pos_price"/>
+ </xsl:if>
+ </span>
+ </td>
+ <td align="right">
+ <span class="text">
+ <xsl:choose>
+ <xsl:when
+ test="string(pos_market_value_h)">
+ <xsl:value-of
+ select="pos_market_value_h"/>
+ </xsl:when>
+ <xsl:otherwise> <xsl:text
+ disable-output-escaping="yes"> </xsl:text></xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="waehrung"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="exc_code"/>
+ </span>
+ </td>
+ </tr>
+ </xsl:template>
+ <xsl:template match="Position">
+ <tr class="rzblightblue">
+ <td>
+ <span class="text"> <xsl:value-of
+ select="dep_nr"/>
+ </span>
+ </td>
+ <td align="right">
+ <span class="text">
+ <xsl:value-of select="pos_qty"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="fi_key"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="fi_isin"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="fi_short"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="pos_price_cur"/>
+ </span>
+ </td>
+ <td align="right">
+ <span class="text">
+ <xsl:value-of
+ select="format-number(pos_price, '#,##0.0000')"/>
+ </span>
+ </td>
+ <td align="right">
+ <span class="text">
+ <xsl:choose>
+ <xsl:when
+ test="string(pos_market_value_h)">
+ <xsl:value-of
+ select="pos_market_value_h"/>
+ </xsl:when>
+ <xsl:otherwise><xsl:text
+ disable-output-escaping="yes"> </xsl:text></xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="waehrung"/>
+ </span>
+ </td>
+ <td>
+ <span class="text"> <xsl:value-of
+ select="exc_code"/>
+ </span>
+ </td>
+ </tr>
+ </xsl:template>
+ </xsl:stylesheet>