Escaping single-quotes - an old chestnut I suspect but
I have an XSLT file which is generating a number of SQL statements from an XHTML file (output method is set to "text"). I need to escape apostrophe and quote characters in text nodes and have tried using the code below:
<xsl:function name="hf:escapechars" >
<xsl:param name="currnode" />
<xsl:variable name="apos" select='"'"' />
<xsl:variable name="quot" select="'"'" />
This generates "Description: E Invalid replacement string in replace(): \ character must be followed by \ or $". How can i successfully escape the backslash so it will output?
Thanks for you help, Matt
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format