Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
Get src attribute from publishing image field by xslt sharepoint
5124 Views
Note 
<xsl:value-of select="@publishingImage" disable-output-escaping="yes" />

When you get publishing Image column It give img tag source...
For example: <img style="border:none;" src="/publishImage/src.jpg" />

If you want to check src tag seperately check following code.
Xslt Code
<xsl:variable name="pic1" select="substring-after(@publishingImage,'src=')"></xsl:variable>
<xsl:variable name="pic2" select="substring($pic1,1,string-length(substring-before($pic1,'style'))-1)"></xsl:variable>

<xsl:choose>
       <xsl:when test="not($pic2)">
          <!-- If src attribute does not have value-->
       </xsl:when>
       <xsl:otherwise>
          <!-- If src attribute have value-->
       </xsl:otherwise>
</xsl:choose>
Best Lessons of "Sharepoint(MOSS) XSLT codes"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details