File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Single quote in XSL file...

Shiney Chacko

Joined: Apr 24, 2003
Posts: 2
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 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>
Mapraputa Is
Leverager of our synergies

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:
subject: Single quote in XSL file...
It's not a secret anymore!