Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Access Web config from xsl [Thread Next] Re: Access Web config from xslTo: NULL Date: 12/5/2007 2:22:00 PM VicToro wrote: > I am using a xsl document to transform xml into html. > I want to access the web.config file to retrieve a path for a file > that is stored in the appSettings. > > Any suggestion on how to do that? Define a global parameter in the stylesheet, then set that parameter before running the transformation. That way you simply read the appSettings as you normally do it with .NET code and pass the received value to the stylesheet. See <URL:http://msdn2.microsoft.com/en-us/library/system.xml.xsl.xsltargumentlist.addparam.aspx> on the method to add parameters before you run a transformation. Such an argument list is passed as the second argument to the Transform method of XslCompiledTransform. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
