Problem using C# function in XSLT Options
Monadear
Posted: Wednesday, August 13, 2008 11:10:19 AM
Rank: Newbie

Joined: 8/13/2008
Posts: 5
Location: India
Hello All,

I have a problem using C# function in XSLT.
Is this the right place to ask question ?
Please let me knowAnxious

Thanks,
Monadear
Dirk
Posted: Wednesday, August 13, 2008 11:14:12 AM

Rank: Umbracoholic

Joined: 9/27/2007
Posts: 1,022
Location: Belgium
Hi,

If related to subject, yes, why not?
Might be nice to know what exactly your problem is here?

Go ahead and shoot your question!

Regards,
/Dirk


level 1 certified - umbraco blog at netaddicts.be - working on an integrated forum4umbraco
Petr Snobelt
Posted: Wednesday, August 13, 2008 11:23:31 AM
Rank: Aficionado

Joined: 10/2/2007
Posts: 166
Location: Czech Republic
Monadear
Posted: Wednesday, August 13, 2008 11:24:25 AM
Rank: Newbie

Joined: 8/13/2008
Posts: 5
Location: India
Thanks for quick reply.

I have a function which converts Double value into a String.
If i run this function in .Net framework it runs perfectly and the result is correct.
But i use this function in a XSLT and run it it throws a exception but no detail of this is given anywhere.
I found where the application in crashing.

decimalDeg = Math.Abs(decimalDeg);
intDeg = 0;
double tery = Math.Floor(decimalDeg);
/* Till here it is working fine */

intDeg =Convert.ToInt32(tery);

When it tries to convert the double value to integer it throws an exception. Where decimalDeg = 0.000027777777777777779

Am i clear till now

Regards,
Monadear
Monadear
Posted: Wednesday, August 13, 2008 11:27:44 AM
Rank: Newbie

Joined: 8/13/2008
Posts: 5
Location: India
Thanks P,

I know how to extend C# function in XSLT, but my problem lies with the function which XSLT parser is not able to convert.
Please see my above comments.
Monadear
Posted: Wednesday, August 13, 2008 12:12:30 PM
Rank: Newbie

Joined: 8/13/2008
Posts: 5
Location: India
Wat happened to all,
No replies from a long time. I need the get myself clear in this.
Is anybody there who knows anything abt this or am not able to convince you.

Go ahead guys
darrenjferguson
Posted: Wednesday, August 13, 2008 1:15:34 PM

Rank: Fanatic

Joined: 3/19/2008
Posts: 219
Location: London, UK
Suggest that you post your complete XSLT which will help us to debug.



Darren Ferguson - Umbraco level 2 certified
www.darren-ferguson.com - www.fergusonmoriyama.com
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.