Sorry this is probably not the most appropriate forum, but I have looked everywhere I can think of. If anyone on this list can point me in the right direction I would be grateful. Thanks, Brian ----- Original Message ----- From: "Brian T. Wolf" <[EMAIL PROTECTED]> Newsgroups: comp.text.xml Sent: Tuesday, November 27, 2001 2:04 PM Subject: xslt and number formats
> OK, I am at my wits' end. I have looked at various sites, specs, and > FAQ's, and I just am not getting an understanding of number > formatting. I am using templates to transform my XML data into a table > after which I will have column totals. I am using the sum() function > and the math seems to be working as expected - with one minor hitch: > the decimals are being truncated. Since I am printing invoices dealing > with currency it is essential that the decimals remain down to the > penny. Can someone explain this in clear English for me, or else point > me somewhere I may not have yet seen? > > sample XML: > <taxes> > <tax_item> > <description>Federal Excise Tax</description> > <amount>2.25</amount> > </tax_item> > <tax_item> > <description>State 911 Emergency Tax</description> > <amount>0.54</amount> > </tax_item> > </taxes> > > sample XSL: > <xsl:template match="taxes"> > <!-- cut irrelevant table info --> > <fo:table-row> > <fo:table-cell> > <fo:block> > <xsl:value-of select="sum(tax_item/amount)"/> > </fo:block> > </fo:table-cell> > </fo:table-row> > <!-- other irrelevant table info --> > </xsl:template> > > I am using xalan-2.0.0 for the transformation, if that makes a > difference. > > Thanks much, > Brian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]