Mega Code Archive
XML transformation with script in the xls
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Xml.Xsl" %>
<%@ Import Namespace="System.Xml.XPath" %>
<%-- BooksWithStyle.xml
title 1
A
B
99.99
title 2
B
C
11.99
--%>
<%-- Books_with_script.xsl
// add cdData tag here
public string ReturnDiscount(string price)
{
decimal priceValue = Convert.ToDecimal(price);
return (priceValue * 15/100).ToString();
}
XSL Transformation
My Book Collection
Title |
Price |
Calculated Discount |
|
|
|
--%>