469,609 Members | 1,166 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

How to pass param into XSL?

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
2 1868


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
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.

Similar topics

4 posts views Thread by Bo Peng | last post: by
4 posts views Thread by z_learning_tester | last post: by
4 posts views Thread by lawrence k | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.