A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Pass a parameter to XSL in Cocoon

In the sitemap:

<map:transform src="xslt/page.xsl">
<map:parameter name="param1" value="{1}"/>
</map:transform>

In the XSL:

<xsl:param name="param1"/>

...

<xsl:template match="whatever">
<xsl:attribute name="something">
<xsl:value-of select="$param1"/>
</xsl:attribute>
</xsl:template>