aspose file tools*
The moose likes XML and Related Technologies and the fly likes Single quote in XSL file... 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 in XSL file..." Watch "Single quote in XSL file..." New topic
Author

Single quote in XSL file...

Shiney Chacko
Greenhorn

Joined: Apr 24, 2003
Posts: 2
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

Joined: Aug 26, 2000
Posts: 10065
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 ]

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Single quote in XSL file...
 
Similar Threads
href target problem...
xml xls not seeing anything
Table Driven menu
xsl - need to select on attribute and limit output
XSL Problem