I used the GetListItems web service from SharePoint to create a data
source in Front Page. One of the fields is formatted as a picture and
is called ows_photo. The format of the data in that field appears to
be url, description.. How do I parse the content and then display it
as a picture?
The original code when inserted into a dataview:
<td class="ms-vb" height="42"><xsl:value-of
select="@ows_Photo"/></td>
and appears like this:
http://thechannel/_layouts/images/no_pic.gif,
http://thechannel/_layouts/lzcustom/images/employeephotos/SACON.jpg
I parsed it like this:
<td class="ms-vb" height="42"><a><xsl:variable name="linktext"
select="@ows_Photo"/><xsl:attribute name="href"><xsl:value-of
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="substring-
after($linktext,', ')"/></xsl:attribute><xsl:value-of
select="substring-before($linktext,', ')"/></a></td>
and it appears like this:
http://thechannel/_layouts/images/no_pic.gif
When I try to format it as a picture, I get an error message:
FrontPage cannot reender the XSLT in this data view.
Failed setting processor stylesheet:0x80004005: A reference to
variable or parameter 'linktext' cannot be resolved. The variable or
parameter may not be defined, or it may not be in scope.
Do you know someone who can help? Share a link to this thread on twitter, or facebook.