my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes Single quote conversion problem in XSL.... and JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Single quote conversion problem in XSL.... and JavaScript" Watch "Single quote conversion problem in XSL.... and JavaScript" New topic
Author

Single quote conversion problem in XSL.... and JavaScript

Shiney Chacko
Greenhorn

Joined: Apr 24, 2003
Posts: 2
Hi,
I tried to use the following in the XSL file but when i click the link the javascript gives me an error... as it does not understand quot; because during parsing the browser converts the "single quote" to quot; Please do let me know if there is any other way to handle the single quote problem...
----------Source----------------------------
<a href="openWin('{URL_NAME}?FormName=AddAppForm&FieldName=chk{HIDDEN_NAME}')"><xsl:value-of select="APP_NAME"/></a>
----------Source End ------------------------

--------------Result--------------------------
<a href="openWin('{URL_NAME}?FormName=AddAppForm&FieldName=chk{HIDDEN_NAME}&apos "><xsl:value-of select="APP_NAME"/></a>
-------------Result End------------------------
Thanks..
Shiney
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
in the source either do this
replace " with \"
or try using
CDATA
see if that works
[ April 28, 2003: Message edited by: Eric Pascarello ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Single quote conversion problem in XSL.... and JavaScript