Show all fields and values with XSLT

When developing with XSLT it is often useful to check which fields and values are available. The following solution will give you an easy and quick solution to view all the fields with there values.


1. Open the ItemStyle.xsl in SharePoint Designer.
2. Add the following code.

<xsl:template name="AllValues" match="Row[@Style='AllValues']" mode="itemstyle">
	<xsl:for-each select="@*">
		<xsl:value-of select="name()"/>
		<xsl:text> = </xsl:text>
		<xsl:value-of select="."/><br/>

3. Select the ALLValues Item style in the Content Query Web Part settings.


This example shows all the values from a task list.