I'm new to XSLT, and I'm also new to Sharepoint.
I've modified my XLV Web Part so that it has the following xml:
<xsl>
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal" xmlns:o="urn:schemas-microsoft-com:office:office">
<xsl:include href="/_layouts/xsl/main.xsl"/>
<xsl:param name="AllRows" select="/dsQueryResponse/Rows/Row[$EntityName = '' or (position() >= $FirstRow and position() <= $LastRow)]"/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:template match="View[@BaseViewID='0']" mode="full" ddwrt:ghost="always">
<div class="box whatsnew">
<div class="boxcontent">
<h2><xsl:value-of select="List/@title" /></h2>
<p><xsl:value-of select="List/@description" /></p>
<ul>
<xsl:for-each select="$AllRows">
<li>
<em><xsl:value-of select="@Date" /></em><br />
<a href="{@Link}"><xsl:value-of select="@Text" /></a>
</li>
</xsl:for-each>
</ul>
</div>
</div>
</xsl:template>
</xsl:stylesheet>
</xsl>
When I view my WebPart in Design mode in SharePoint designer, the list items are populated as I would expect.
But when I publish my changes to the SharePoint site, three of the values are returned as blank. These values are the values inside of the for-each statement: @Date, @Text, and @Link.
I've searched for answers. To no avail. Any ideas as to why this code doesn't work on my live Sharepoint site? Any insights would be greatly appreciated!
their is a problem with your declaration of AllRows variable. it seems its getting either epmpty rows.
Kindly check the conditional part of filter statement which looks like the problamitic area. i would recommend first remove the conditional part and check if the data is completely retrieved. and then modify your filter statement