Have a common function in Javascript which do transform for all .xsl's.
XSL object is loaded like this.
var xslobj=new ActiveXObject("MSXML2.FreeThreadedDOMDocument.4.0" );
xslobj.async = false;
xslobj.load(xslpath);
Here inserting an 'xsl:import' node to the xsl before doing transform.
This xsl contains some common templates which can be used across all xsl's.
So no need of doing import of this specifically in all xsl's.
var xslDoc = xslobj.documentElement;
var newNode =
xslobj.createNode(1,"xsl:import","http://www.w3.org/1999/XSL/Transform") ;
newNode.setAttribute ("href",server.mappath("common.xsl") ;
FirstChild=xslobj.documentElement.childNodes(0);
xslDoc.insertBefore(newNode, FirstChild);
This works fine in Javascript.
Now I'm trying to use the same logic in C Sharp.
Using System.Xml.Xsl.XslTransform for xsl.
Is it possible to do similar thing in C Sharp using
'System.Xml.Xsl.XslTransform' class.
I'm newbie to C Sharp.
thanks,
Praveen.