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

Re:

Subject: Re:
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 20 Feb 2002 10:04:49 +0000
format number required whitespace
Hi Jean,

> Hello, I have a problem with decimal-format : when I try the following
>
> <xsl:decimal-format name="my_fmt"  grouping-separator="'" />
> format-number(1234.5, "#'##0,00", 'my_fmt') => "1'234,5"
>
> I get with MS IE v5.5 the error message
>
>  Required white space was missing. Error    
>  processing resource                        
>  'file:///C:/Acor_dev/clips/f_calcul.xsl'.  
>  Line 1874, Position 45                     
>
>      <xsl:value-of select="format-number(.,
>  "###'###'###", 'acor_fmt')"/>              
>  ------------------------------------------ 
>  --^                                        

The problem isn't with your decimal format, it's with the
well-formedness of your stylesheet. You're delimiting the value of the
select attribute of the xsl:value-of with double quotes, but also have
an unescaped double quote within the select attribute itself. You need
to escape the double quote in the attribute value so that the XML
parser doesn't misinterpret it as indicating the end of the attribute
value:

  <xsl:value-of select="format-number(., &quot;###'###'###&quot;,
                                      'acor_fmt')" />

Also, don't forget to add a decimal-separator attribute to the decimal
format if you intend to use , rather than . as the indicator of the
decimal point within the format pattern.
                                      
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.