decimal point

P

Piero Crincoli

I have a xsl file with a test like <xsl:when test="quantity &gt;
100">.
It works only if field quantity is expressed with '.' as decimal
point, but I need to use the ',' as decimal point. How can I do?
I'm new to xml/xsl, thanks for any help.
Piero
 
B

Ben Edgington

I have a xsl file with a test like <xsl:when test="quantity &gt;
100">.
It works only if field quantity is expressed with '.' as decimal
point, but I need to use the ',' as decimal point. How can I do?
I'm new to xml/xsl, thanks for any help.
Piero

how about

<xsl:when test="number(translate(quantity,',','.')) &gt; 100">.

[untested - the number() function may not be needed, or even
allowed here. I don't understand the Note in section 4.4
of the XPath document.]

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top