Thursday, April 19, 2012

Get the XML feeding your XSLT

Got this little tidbit from Joe Picc today, which is a good way to get the XML that's getting passed to your XSLT in your SharePoint web parts:

After your  <xsl:template match="/" ...> tag, add the following:

                <xmp>
                      <xsl:copy-of select="." />
               </xmp>

What gets returned is the XML that is sent to your XSLT, so if you need to check it out or debug with it you can.

No comments: