How to pass parameter from JSPX to XSLT

Passing parameter from jspx to xslt is following
The first thing is we have to set parameter from jspx. You can use the following code in your jspx code where you are using the code to transfomation.

<x:transform xml="${youXML}" xslt="${yourXSLT}" >
   <x:param name="param" value="${param.yourParam}" />
   <x:param name="getServerName" value="http://${pageContext.request.serverName}" />
</x:transform>

Also you can pass server information by parameter. It is very important because you have no way to get server information in xslt. So, You have to need any time any pupose.

So, now we can see how we get the parameters in xslt page. Here is the code

<xsl:param name="getServerName">
<xsl:param name="param">

Now how to use this parameter. Yes, you can follow this

<xsl:value-of select="$param" />

If you are in problem to access the parameter. please feel free to discuss with me.

Advertisements

1 thought on “How to pass parameter from JSPX to XSLT”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s