Jun 27, 2012

Simple XSL file for an XSLT List View Webpart in SharePoint 2010

Here's the contents of a simple XSL file to apply to almost any XSLT List View webpart.  Of course you'll probably want to change a few fields and the layout, but it's much simpler than editing the entire XSLT view from Sharepoint Designer.

<xsl:stylesheet version="1.0" exclude-result-prefixes="x d xsl ddwrt" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">
<xsl:template match="/">
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
<xsl:for-each select="$Rows">
<xsl:value-of select="@Title" />

No comments:

Post a Comment