Using .NET methods in your XSLT

Not many people know that it is possible to use a .NET object as an extension object when transforming XML with XSLT. Imagine that you want to recalculate the price of a book and round the result number. Impossible to calculate within XSLT, since it’s a transformation language and not a programming language. Solution is to create a class with a method that performs the calculation. Then when transforming add this opject as an extension object to the XsltArgumentList. The C# code:   public class BookPrice { public decimal NewPrice(decimal price, decimal conv) ... [More]