Viewing XML data from XSLT
This post shows how you can easily view the XML that is used in an XSL transform, so you can see the elements that you can use in the display.
I’m a big fan of using XSLT for presentation, so it is great to see that many of the web parts that MOSS and WSS 3.0 provide take advantage of this for rendering their output. To view the XML data that is used in the transform all you need to do is include the following line in your XSL template:
<xmp><xsl:copy-of select="."/></xmp>
This is great for viewing the internal SharePoint field names that are returned from list queries. For example if I include this in the ItemStyle.xsl that is used in the content query web part I get the following results:
In ItemStyle.xsl
<xsl:template name="Default" match="*" mode="itemstyle">
<xmp><xsl:copy-of select="."/></xmp>
Result
Great when you are customising these web parts!