XSL Transformation in Java with parameters
If you pass a parameter like:
transformer.setParameter("render_id", "1234");
the parameter can be picked up by the transform:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes"/>
<!-- Receives the id of the menu being rendered. -->
<xsl:param name="render_id" />
rsp's answer was spot on. Thanks. Just want to add that you cannot pass a parameter to a variable in the same way (I am setting parameters via Java's TransformerFactory).
I made the mistake of thinking variables and params were interchangeable :)