473,385 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Hot to call C# function inside XSLT ?

Hi,

Is it possible to call C# function inside XSLT ?

Thanks,
Max
Nov 15 '05 #1
2 4936
here is a short sample that should get you started

<xsl:for-each select="Ledger/*"><xsl:value-of select="user:Total(.))"/
xsl:for-each><msxsl:script implements-prefix='user' language='C#'
decimal balance = 0

void Total(XPathNodeIterator iter)
XmlNode node = e.NextNode()
string s = node.SelectSingleNode("amount").InnerText
decimal amount = Decimal.Parse(s)
if (node.Name == “deposit” || node.Name == “balance”
balance += amount
els
balance -= amount
return balance

]]
msxsl:script

ht
jayson
Nov 15 '05 #2
answer : http://msdn.microsoft.com/msdnmag/issues/02/03/xml/

"Maxim Kazitov" <mv*****@tut.by> wrote in message
news:uV*************@TK2MSFTNGP11.phx.gbl...
Hi,

Is it possible to call C# function inside XSLT ?

Thanks,
Max

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bryan Parkoff | last post by:
I know how to write "Pointer to Function" inside struct or class without using static, but I have decided to add static to all functions inside struct or class because I want member functions to be...
1
by: Maxim Kazitov | last post by:
Hi, Is it possible to call C# function inside XSLT ? Thanks, Max
3
by: darrel | last post by:
In my XSLT, I'm trying to write out some dynamic URLs. I can't put an actual xsl:value-of field inside a URL: <a href="<xsl:value-of select="linkUrl"/>"> But I can do this: <a...
4
by: Dave | last post by:
I have a program that I've written a class for. I need to call the function in the program from the class. When I try to call the function I receive the error, the name xxx does not exist in the...
9
by: Christian Havel | last post by:
Hi, can I create a instance from a class which is another assembly and call a function inside this assembly? I know the assembly name, class name, the function name and its signature. Thanks...
0
by: DAnne | last post by:
I'm trying to do a simple count function in xslt and it's turning out to be extremely painful. I have a report that brings back a set of responses for each question per section in an Audit. I...
0
by: ahcirlko | last post by:
I am using different user controls in same page. I have a function inside of the .ascx file. How can I call it from another .ascx file Language C#
1
by: dyc | last post by:
Hi..may I know how to call a function inside ur main form? Public Function BinaryToDec(ByVal BinaryValue As String) As Long Do BinaryToDec = BinaryToDec +...
4
by: MasterVision | last post by:
Hey folks, I have .NET Solution with the combinations of VB, C/C++ and C# projects on it. I have no problem calling C/C++ function inside my VB project but I dont know how to do the same with C#...
1
by: suratna | last post by:
i have an xslt file. i have no problem writing html code inside it but when i write a mysql select query inside it, it gives error. Is there any way to write php code inside xslt file? ratna
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.