Working with quotes in XSLT

I have a XSLT file where I need to pass strings to javascript.   Due to the way the code is written the string designator is the single quote.  Typically that is not an issue but what happens if the text you pass in contains an apostrophe, AKA single quote?  You will need to perform a translation within XSLT to change the apostrophe to "    Now comes the fun part.  Here is a XSLT translation:

<xsl:value-of select=”translate(.,’a’,’A’)” />

so how to you tell XSLT that you want to translate a single quote into the &quot;  After trying various combinations of escapes and multiple single quotes I found that

<xsl:value-of select=”translate(.,&quot;’&quot;,’&quot;’)” />

works.  What a pain!

Make sure to check out the Microsoft Incentives web site

Kind of like sales on Microsoft licenses:


For a limited time only!   15% off L&SA – Exchange Server Standard, Office Communication Server Standard, SQL Server Standard, Office SharePoint Server, Visual Studio Team Suite, Office Project Standard, Office Project Professional, Office Visio Standard and Office Visio Professional. 25% off L&SA: Exchange Server Enterprise, Office Communication Server Enterprise, Windows Server Enterprise and Sever Management Suite Enterprise (SMSE).

Cannot unregister UpdatePanel with ID ” since it was not registered with the ScriptManager and MOSS

I have run into this while trying to get the AjaxControlToolkit working with MOSS.  Turns out there are a couple of things that can cause this.  The first is using CreateChildControls to create your controls.  While this is typically a best practice in this case it can cause an error.   You can create your controls in the OnInit call instead.

The second one, and the most annoying is any other error thrown but not caught.  This took a while to figure out and can be a real pain if you do not have the ability to debug remotely.

Final word of warning, watch out for that quirky mode in Internet Explorer.  It can be a real pain!