Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

reuse parameters/variable in stylesheet problem

 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, please help.
The scenario is:
1. first query(http://query1/ )to get dynamic xml document and apply stylesheet to generate query2 on the fly; e-mail application for example.
xml:
<mailquery>
<pop3srv>param1</pop3srv>
<smtpsrv>param2</smtpsrv>
</mailquery>
stylesheet
<xsl:stylesheet..>
<a href="http://query2?pop3=param1&smpt=param2&action=read" >Read</a>
<a href="http://query2?pop3=param1&smpt=param2&action=send" >Send</a>
</xsl:stylesheet>
2. when I click Read, I will get another xml document and
another stylesheet on the fly
<Mail>
<Msg id="1">bbb</Msg>
<Msg id="2">ccc</Msg>
</Mail>
<xsl:stylesheet..>
You have <xsl:value-of select="count(Mail/Msg)" /> messages.
<a href="http://query3?PARAMS...msgid=1&action=getContents>Get Contents1</a>
<a href="http://query3?PARAMS...msgid=2&action=getContents>Get Contents2</a>
</xsl:stylesheet>
When I click Get Contents1, the params I want to use is from the stylesheet1 which is the same pop and smtp;
but, I don't have this information anymore when I get the second xml document. Is there a way to know and continue use the params?
Please help. Thanks.
--Zoe
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can either include parameters in your second XML document (if it is generated dynamically and you have control on its generation) or to call your second stylesheet with those parameters, in this case they must be declared in the stylesheet.
 
Check your pockets for water buffalo. You might need to use this tiny ad until locate a water buffalo:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic