• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing param from request to xsl stylesheet..

 
Veronica Damian
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

I need to pass a param in query string of url and pass it to a link that's in XSL..

http://www.mysite.com/attendees.jsp?eventid=<valueHere>

there is a custom tag that prints dynamic content w/an XSL stylesheet..

<placeContentisplayTopArticles ... styleSheet="/xsl/dta_body.xsl">

we cannot alter structure of XML (by adding a tag or a param to an existing tag), so... how to pass 'eventid' param to the XSL stylesheet specified in this tag?

thank you very much..
 
Veronica Damian
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PLEASE.. PRETTY PLEASE.. I need an answer.......

thank you very much..



Originally posted by Veronica Damian:
hi,

I need to pass a param in query string of url and pass it to a link that's in XSL..

http://www.mysite.com/attendees.jsp?eventid=<valueHere>

there is a custom tag that prints dynamic content w/an XSL stylesheet..

<placeContentisplayTopArticles ... styleSheet="/xsl/dta_body.xsl">

we cannot alter structure of XML (by adding a tag or a param to an existing tag), so... how to pass 'eventid' param to the XSL stylesheet specified in this tag?

thank you very much..
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you have a custom tag that does XSL transformations. Your question must be how to pass an XSLT parameter to that custom tag, then?

Basically, your question should be addressed to the author of the custom tag, if there is no documentation available. It's possible the author didn't provide a way to pass parameters. Or it's possible they did, too. But there's no way for anybody to tell unless they know something about the tag.
 
Veronica Damian
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no no no.. I don't need to pass XSLT param to tag, I need to pass param grabbed from query string in url to XSL stylesheet...

this is what it is:

AffData = request.getParameter("AffiliateData");

this param I need to pass to XSL specified in the tag (tag is in same JSP where code is to grab param..)

<placeContentisplayTopArticles ... styleSheet="/xsl/dta_body.xsl">

how to I pass param grabbed from query string in url to stylesheet specified in custom tag..

thank you very much..
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, normally in Java you "pass a parameter to a stylesheet" by calling the setParameter() method on the Transformer that is applying the stylesheet.

But when you said your problem involved a custom tag, I assumed (based on absence of any other information) that the custom tag would be the one constructing the Transformer and doing the XSL transformation. If that is the case, then you would have to give the parameters to the custom tag and let it call the setParameter() method.

Is that correct? If so then talk to the person who wrote the tag.

If not, then post your code that is creating a Transformer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic