This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re:


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]