W3cubDocs

/Web APIs

XSLTProcessor: setParameter() method

The setParameter() method of the XSLTProcessor interface sets the value of a parameter (<xsl:param>) in the stylesheet imported in the processor.

Syntax

js

setParameter(namespaceURI, localName, value)

Parameters

namespaceURI

The namespace associated with the parameter name. A "null" value is treated the same as the empty string ("").

localName

The name of the parameter in the associated namespace.

value

The value of the parameter.

Note: Firefox supports any kind of parameter. Chrome, Edge and Safari only support string parameters.

Return value

None (undefined).

Examples

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
setParameter
1Chrome only supports string values.
12Edge only supports string values.
1 No
≤12.1Opera only supports string values.
3.1Safari only supports string values.
3WebView only supports string values.
18Chrome only supports string values.
4
≤12.1Opera only supports string values.
2Safari only supports string values.
1.0Samsung Internet only supports string values.

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/XSLTProcessor/setParameter