471,354 Members | 1,213 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,354 software developers and data experts.

XsltArgumentList doesn't accept long parameter values

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);

// Create the XslTransform and load the stylesheet.
XslTransform xslt = new XslTransform();
xslt.Load(stylesheet); // xsl stylesheet

XmlUrlResolver xmlUrlResolver = new XmlUrlResolver();

// Output to console.
XmlTextWriter writer = new XmlTextWriter(Console.Out);

// Transform the xml file
xslt.Transform(new XPathDocument(filename), xslArg, writer,



XSL file looks like this

<xsl:stylesheet version="1.0"
<xsl:param name="xslParam"/>
<xsl:template match="/">
<alku><xsl:value-of select="$xslParam"/></alku>
The problem is that node grandpa/father/son is not executed! It's
passed to XSL file
but XslTransform classes transsform method does not fetch it's value
from xml file.
It only shows the key value in console. Node grandpa/father/son has
value in it's
xml file.

So, am I missing something or is there a bug in XsltArgumentList and
it's transformation.

Has anyone any ideas what could be wrong?


Feb 6 '06 #1
0 1179

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by chris yoker via DotNetMonster.com | last post: by
10 posts views Thread by krunalb | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.