SharePoint XSLT: how to deal with debug js versions
September 15, 2011
So, how to deal with that?
Turns out, SharePoint already have a framework to achieve this. All you need to do is to use OOTB ScriptLink control.
And here I just would like to add: occasionally, you might need to reference your script from XSLT. And in XsltListViewWebPart, server controls are not allowed. So, what to do?
The solution is very simple, you're looking for ddwrt:IfDebug function. You can use it following way:
<xsl:when test="ddwrt:IfDebug() = 'True'">