Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Passing Parameters

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
This is a very simple question, but one that i haven't been able to figure out yet.
All I want to do is pass two parameters to the Query String from my HTML action tag in my Xsl file. Here is my code.
<a href="FindRowKey.jsp?pCustid={Custid}&pAct=E">E</a>
It gives me the following error:
java.lang.RuntimeException: XML parse error in file file:/C:/Program Files/Oracle/JDeveloper 3.2/myhtml/MyPractice_html/GridData.xsl
at line 22, character 62
Expected ';'.

Any suggestions? I thought this was fairly straightforward.
 
Ranch Hand
Posts: 334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you try:
<a href="FindRowKey.jsp?pCustid='Custid'&pAct='E'">E</a>
if Custid and E are string.
If they are variables you have to do differently.
Just try to give you a thought to try.
Good luck
Ruilin

 
Jolene Dicks
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No that doesn't work. The value for Custid comes dynamically from the XML file and you have to use those curly braces to do that. It works fine. But when I tried adding the second parameter to it.. that's when I got a problem. I wonder if it has anything to do with the & being there. XSL stylesheets expect & when you are using < and stuff for <? Could that be a possibility? Any suggestions?
 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're right, the XML parser is trying to interpret the &pCustId... part of your attribute value as an entity reference. To fix it, you'll need to escape the & by writing it as:
Now, without actually trying this myself, I'm afraid that XSLT might escape the & on output, yielding a hyperlink that looks like FindRowKey.jsp?pCustid=1234&amp;pAct=E. If this is the case, you'll need to use the <xsl:attribute> element to build the href attribute and use the <xsl:text disable-output-escaping="yes"> element to include the &. I hope this helps!
------------------
W. Scott Means
author, Strategic XML
smeans@strategicxml.com
[This message has been edited by W. Scott Means (edited October 18, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic