Documentation Center

XSLT stylesheet custom parameters

You can pass a custom parameter to the XSLT stylesheet that you added to the input package. The value of the parameter in the package overrides any default value you may have set for it in the stylesheet itself.

For example, if your XSLT stylesheet contains the following line:

<xsl:param name="myParam">My Default Value</xsl:param>

Then the parameter myParam gets the value "My Default Value" by default. But if the input package contains an item named myParam set to a different value, the default value is ignored and the package value is used instead.

To put such an item in your package, in a Template Building Block invoked before the stylesheet, make the C# method call package.PushItem("myParam", Item), where Item contains the value you want to give to myParam.