Assigns a value to a stylesheet parameter.
- name
- The name of the variable.
- namespaceUri
- The namespace URI of the variable, or the empty string for variables not declared in a namespace.
- parameter
- The value to assign to the parameter.
Stylesheet parameters refer to top-level xsl:param nodes outside of templates. For instance:
XML Example
<xsl:stylesheet xmlns:mynamespace="http://www.mydomain.com"> <xsl:param name="arg1" select="'defaultValue'" /> <xsl:param name="mynamespace:nsarg1" /> </xsl:stylesheet>To assign a value to the first parameter, use:
C# Example
args.AddParam("arg1", "", "newvalue");To assign a value to the second parameter, use:
C# Example
args.AddParam("nsarg1", "http://www.mydomain.com", "newvalue");
Namespace: System.Xml.Xsl
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0