Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XsltArgumentList doesn't accept long parameter values >Thread Next - Re: XsltArgumentList doesn't accept long parameter values Re: XsltArgumentList doesn't accept long parameter valuesTo: NULL Date: 2/6/2006 4:35:00 PM
hulkko123@y... wrote:
> I have problems passing parameters from C# application to XSL file and
> doing a transformation.
> My code is below.:
>
> XsltArgumentList xslArg = new XsltArgumentList();
>
> String key = "grandpa/father/son"; // This is the name of node I
> want pass and gets it value
> xslArg.AddParam("xslParam", "", key);
> <xsl:param name="xslParam"/>
What you do there in your .NET code is equal to having
<xsl:param name="xslParam" select="'grandpa/father/son'" />
meaning the parameter value you set from .NET is simply a string.
You obviously want to achieve the same as having
<xsl:param name="xslParam" select="grandpa/father/son" />
but you can't do that by passing in a .NET string variable with
AddParam. Passing in a node set is possible by passing in a .NET
XPathNodeIterator, see
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXsltArgumentListClassAddParamTopic.asp>
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
