By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

How to pass param into XSL?

P: n/a
Hi all,

I got a JSP using JSTL to transform XML to HTML, and I want to pass a
variable "statusFilter" into the XSL. e.g.

<x:parse xml="${xml}" var="doc" />
<x:transform xml="${doc}" xslt="${xslt}">
<x:param name="statusFilter">
ABCD
</x:param>
</x:transform>

How can I pick up the value (ABCD) in the XSL and use it for condition?

Cheers,
Art.

Mar 23 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a


ar************@gmail.com wrote:

I got a JSP using JSTL to transform XML to HTML, and I want to pass a
variable "statusFilter" into the XSL. e.g.

<x:parse xml="${xml}" var="doc" />
<x:transform xml="${doc}" xslt="${xslt}">
<x:param name="statusFilter">
ABCD
</x:param>
</x:transform>

How can I pick up the value (ABCD) in the XSL and use it for condition?


I don't know that language but probably you need e.g.
<xsl:param name="statusFilter" />
in the XSLT stylesheet and then you can use e.g.
$paramFilter
in XPath expressions in the stylesheet to access the value of the global
parameter as set externally.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Mar 23 '06 #2

P: n/a
Cheers Martin,

Yes that was the syntax. I was putting it in the template so not
working. moved it out then it works. ;)

Mar 23 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.