Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Math and xsl

From: Roshawn Dawson <udrago@---------.--->
To: 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 
> 
> 
> 


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent