473,796 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hot to call C# function inside XSLT ?

Hi,

Is it possible to call C# function inside XSLT ?

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

<xsl:for-each select="Ledger/*"><xsl:valu e-of select="user:To tal(.))"/
xsl:for-each><msxsl:scr ipt implements-prefix='user' language='C#'
decimal balance = 0

void Total(XPathNode Iterator iter)
XmlNode node = e.NextNode()
string s = node.SelectSing leNode("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******** *****@TK2MSFTNG P11.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
3983
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 bound inside struct or class to become global functions. It makes easier for me to use "struct.memberfunction()" instead of "globalfunction()" when I have to use dot between struct and member function rather than global function. I do not have...
1
7671
by: Maxim Kazitov | last post by:
Hi, Is it possible to call C# function inside XSLT ? Thanks, Max
3
1941
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 href="{linkURL}">
4
2857
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 class or namespace. Where xxx is the function being called. How do I call the function?
9
9548
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 Christian
0
4540
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 want to bring back the response only once (i.e. Na,Yes, No answers only once). I have this working. The part I'm having trouble with is the count. Now for each response I need to do a tally of how many times the respondent answered Yes or No. My...
0
1210
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
5192
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 + (Strings.Left(BinaryValue, 1) * 2 ^ (Len(BinaryValue) - 1)) BinaryValue = Mid(BinaryValue, 2) Loop Until BinaryValue = "" End Function if i want to call this function under a button eventhandler,how should I call it?
4
9258
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# Project. How to call C# function inside VB.NET? Any help would be highly appreciated. Thank you
1
4424
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
0
9679
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9050
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.