xsl-list
[Top] [All Lists]

RE: how to escape backslash apostrophe text

2003-09-18 13:43:45

Yes, but I think the problem is introduced later when the variable is used
in an assignment to an html value attribute.



-----Original Message-----
From: Michael Kay [mailto:mhk(_at_)mhk(_dot_)me(_dot_)uk] 
Sent: Thursday, September 18, 2003 3:20 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] how to escape backslash apostrophe text


If I want to transform to html, how do I escape the text \', 
so that it will 
show in HTML as \' and not merely '?

Backslash is not a special character in XML, but the apostrophe is. A
useful approach is:

<xsl:variable name="x">\'</xsl:variable>
<xsl:value-of select="$x"/>

Michael Kay


_________________________________________________________________
Get a FREE computer virus scan online from McAfee. 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
This electronic transmission is strictly confidential to Smith & Nephew and
intended solely for the addressee.  It may contain information which is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>