• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XSLT apply-template with-param not working

 
kapil Gupta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am facing problem in passing parameter using apply-templates in XSLT.


The value of parameter myvar is coming out to be empty in strong//text() template. Is this the right way to pass parameter?
Regards,
Kapil
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that is the correct way to pass parameters.

If you are getting nothing as the parameter of the second template, then perhaps it is not being called by the first template. Perhaps the first template calls a built-in template rule for some node, and that rule in turn calls the second template.
 
kapil Gupta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul. I think you are right. The apply-template is calling some other template because it is working if I use call-template.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic