Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Single quote in XSL file...

 
Shiney Chacko
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I am facing a problem with the single quote in the XSL file. Actually I need to construct a url dynamically and the use the javascript function window.open(url) but on my XSL page the single quote(') conversion is not taking place at all instaed it places " in all the places where it finds the single quote('). I am sending you the xsl file along with this mail...
Please help...
-----------xsl contents-------------------

<td align="center" valign="bottom" width="247">
<a href="#">
<xsl:attribute name="onClick">
openWin('<xsl:value-of select="URL_NAME"/>?FormName=AddAppForm&FieldName=chk<xsl:value-of select="HIDDEN_NAME"/>')</xsl:attribute>
<xsl:value-of select="APP_NAME"/></a>
</td>
----------------------------------------------
Thanks..
Shiney
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use so-called "attribute-value template"
and replace <xsl:value-of ...> with {} in attribute values, and write your link as
<a href="#" onClick = "openWin('{URL_NAME}?FormName=AddAppForm&amp;FieldName=chk{HIDDEN_NAME}')">
<xsl:value-of select="APP_NAME"/></a>
Does this solve your problem?
[ April 24, 2003: Message edited by: Mapraputa Is ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic