Is it possible to pass a parameter to a stylesheet

I have a xslt stylesheet ready at design time. At runtime, I may want a little different stylesheet based on a runtime parameter. I could write the original stylesheet so that the output is determined by a xsl:variable. But how could I set the variable value at runtime? Is it possible? Any other way to do so?

thanks,

XSLT processors do enable parameters setting at runtime. Syntax depends on code language (Java ? .net ? php ?).

In your xsl :

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version=“1.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”>

<xsl:param name="myParam" select="'default value if no parameter is set" />

<xsl:template match="/">
	<xsl:value-of select="$myParam" />
</xsl:template>

</xsl:stylesheet>

Java :

javax.xml.transform.Transformer.setParameter(String name, Object value)
(http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/Transformer.html)

PHP :

XSLTProcessor->setParameter()
(http://www.php.net/xsl)

Hope this helps