Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: Math and xsl [Thread Next] Re: Math and xslTo: NULL Date: 6/2/2005 3:32:00 PM That was quick!!! Thanks for the info Dimitre. :-) Dimitre Novatchev wrote: > Read about and use the substring function. > > Cheers, > Dimitre Novatchev. > > > "Roshawn Dawson" <udrago@b...> wrote in message > news:er$sjE7ZFHA.2308@T...... > >>Hi, >> >>In my books.xml file, each book has a price node that contains other >>nodes. It looks like this: >> >><books> >> <book> >> <title>Some Title</title> >> <author>One Author</author> >> <author>Another Author</author> >> <listprice> >> <amount>1726</amount> >> <formattedprice>$17.26</formattedprice> >> </listprice> >> <ourprice> >> <amount>1531</amount> >> <formattedprice>$15.31</formattedprice> >> </ourprice> >> </book> >> <!-- other book nodes go here --> >></books> >> >>What I'd like to do is subtract the formattedprice node of ourprice from >>the formattedprice node of listprice to get the difference. This is what >>I'm aiming for: >> >><xsl:value-of select="books/book/listprice/formattedprice - >>books/book/ourprice/formattedprice"/> >> >>However, the result I get is NaN. After checking thing out, the problem >>is that the data for each formattedprice begins with the "$" character. Is >>there a way that I can remove that character so that I get the desired >>data? >> >>Thanks, >>Roshawn > > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
