A
Amit Maheshwari
hi,
i m converting my vs 2003 web site in vs 2005. i have used XslTransform
in 2003. here the code i have in my 2003 project
XslTransform xslt = new XslTransform();
xslt.Load(XslSystemFileName);
XPathDocument xpathdocument = new XPathDocument(XmlSystemFileName);
XPathNavigator nav = xpathdocument.CreateNavigator();
//Transform
XPathExpression expr= nav.Compile("/TOPICLIST/*");
XPathNodeIterator iterator = nav.Select(expr)
while (iterator.MoveNext()){
StringBuilder sb= new StringBuilder();
StringWriter sw = new StringWriter(sb);
XPathNavigator nav2 = iterator.Current;
string sName = nav2.GetAttribute("TYPE","");
XsltArgumentList xsltArgs = new XsltArgumentList();
xsltArgs.AddParam("MenuItem","",sName);
xsltArgs.AddParam("MenuType","",sMenuType);
xslt.Transform(nav2, xsltArgs, sw, null);
sGenericMenu=sb.ToString();
if (null!=alMenuTypes)
alMenuTypes.Add(sName);
}
if i use XslCompileTransform instead of XslTransform i am not getting the
proper output.
what should i do to resolve my problem.
thanks
i m converting my vs 2003 web site in vs 2005. i have used XslTransform
in 2003. here the code i have in my 2003 project
XslTransform xslt = new XslTransform();
xslt.Load(XslSystemFileName);
XPathDocument xpathdocument = new XPathDocument(XmlSystemFileName);
XPathNavigator nav = xpathdocument.CreateNavigator();
//Transform
XPathExpression expr= nav.Compile("/TOPICLIST/*");
XPathNodeIterator iterator = nav.Select(expr)
while (iterator.MoveNext()){
StringBuilder sb= new StringBuilder();
StringWriter sw = new StringWriter(sb);
XPathNavigator nav2 = iterator.Current;
string sName = nav2.GetAttribute("TYPE","");
XsltArgumentList xsltArgs = new XsltArgumentList();
xsltArgs.AddParam("MenuItem","",sName);
xsltArgs.AddParam("MenuType","",sMenuType);
xslt.Transform(nav2, xsltArgs, sw, null);
sGenericMenu=sb.ToString();
if (null!=alMenuTypes)
alMenuTypes.Add(sName);
}
if i use XslCompileTransform instead of XslTransform i am not getting the
proper output.
what should i do to resolve my problem.
thanks