how to pass parameters to xsl file

Java
//On xsl declare:
//<xsl:param name="category"/>

//On xsl use the parameter like:
//select="/form/*[name()=$category]/Question-Category

//Then pass it from Java like this (assuming you are using the JAXP API):
transformer.setParameter("category", "a");
Source

Also in Java: