XSL Tips

When writing XSL, it is often desirable to be able to see the raw XML that you're trying to transform.  This is especially helpful when customizing XSL for web parts such as content query.  The red text below show how to modify the ContentQueryMain.xsl file to do this for a Content Query web part.  This can be used in other web parts that utilize XSL transforms also.


<xsl:template match="/">
    <textarea rows="20" cols="100">
    <xsl:call-template name="OuterTemplate" />
<xsl:template match="node()|@*">
    <!-- Copy the current node -->
        <!-- Including any child nodes it has and any attributes -->
        <xsl:apply-templates select="node()|@*"/>

Comments (0)

Skip to main content