I am using SOAP Service connection to connect to a list in another sharepoint in the collection. (Sharepoint 2010)

All of the data comes over fine, except one field which is an image. The URLs all seem to have a , at the end.

<xsl:value-of select="@ows_Icon" disable-output-escaping="yes"/> 
<img border="0" src="{@ows_Icon}" />

Both return a URL like the following:


Any idea how to remove the , so that I can show the image in the subsite?


This should do it:

<img border="0" src="{substring-before(@ows_Icon, ',')}" />

The comma is there because image fields have 2 fields associated with it, a URL and a description.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.