Skip to main content

Posts

Showing posts from July, 2013

XSLT - Learned the hard way

I never really cared about learning or using XSL and XSL style sheets in my projects. But then I was wrong, I should have mastered this, it is an important weapon in a SharePoint consultant's arsenal. In this blog post I try to note down my experience with XSL so that I can refer back to this again later. 1. If you see characters like ampersand (&) appearing as &amp; in your List view with custom XSL template then you got to disable output escaping. disable-output-escaping ="yes" 2.   For one of my projects I had to dynamically bind a URL field in a DataView webpart. The requirement was to display different views (InfoPath) of a list based on two column values in the list. One of these values was set by a work flow. There are different ways to do this and there may be better ways of achieving this but this is how I did it:   < xsl:choose >            < xsl:when test ="@Status1 = 4 and @Status2 = 4">             <a   onclick