Identity XSL
21. July 2009 04:13

I'm constantly digging around to find a copy of an Identity XSL to use in my SharePoint development.  As so much of SharePoint can be modified through XSL customizations, it's important to be able to get a copy of the source XML so you can go work in a proper XSL Debugger (such as Oxygen XML) to create your XSL files.

 

To do that, I use this identity XSL (for example, as my search results XSL) and it causes SharePoint to print out the raw source XML into the page source, where I can copy it and use it.

<?xml version="1.0" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <!-- IdentityTransform -->
    <xsl:template match="/ | @* | node()">
        <xsl:copy>
            <xsl:apply-templates select="@* | node()"/>
        </xsl:copy>
    </xsl:template>

</xsl:stylesheet>
Tags: Comments (0) | Permalink

Comments

Comments are closed