Subject:how to pass some attribute value from jsp to XSL Author:N T Date:09 Sep 2005 11:39 AM
Hello,
I am assuming that you need to pass some variable value from JSP to XSL. You would have to pass it in as a parameter.
TransformerFactory transFact =
TransformerFactory.newInstance();
Transformer trans = transFact.newTransformer(xsltSource);
trans.setParameter("paramname", strParamValue);
Obviously, there is more to it than this. But this should tell you how to pass it in JSP.
This is how you would receive it in XSL:
<xsl:output method="html"/>
NOTE: this param tag should be a global tag (after stylesheet or output tags).
<xsl:param name="paramname"></xsl:param>
Let me know if this helps and if you have any more questions.
Subject:how to pass some attribute value from jsp to XSL Author:kanchan thukral Date:12 Sep 2005 05:40 AM
hello
in your reply you told me to include this portion of the code in jsp.
but what should i specify instead of this xsltSource.
is this will be the name of the xsl file or what.
please guide me.