However, debugging XSLT requires a data source (in the form of XML sample data) as input to the XSL transform. The simplest way to get a sample input XML file provided by SharePoint for a XSL-enabled web part is to do the following:
1) Open ContentQueryMain.xsl and find the XSL that looks like the following:
<xsl:template match="/"> <xsl:call-template name="OuterTemplate"> </xsl:call-template></xsl:template>
Replace this XSL with the following so that it outputs all xml rather than just applying the OuterTemplate xsl template :
<xsl:template match="/"> <xmp><xsl:copy-of select="*" /></xmp> </xsl:template>
To avoid modifying system files like ContentQueryMain.xsl, you can make a copy the ContentQueryMain.xsl e.g. ContentQueryMainDebug.xsl and point your CQWP to the Content QueryMainDebug.xsl file instead - using the MainXslLink property of the Content Query Web Part (defined in the .webpart file).
2) View Source on the page and locate the block of XML that has been output by your web part.
3) Save it as a text file and use it as input into your favourite XSL development tool.
DDK
4 comments:
XML features in sharepoint workflows: HarePoint Workflow Extensions ( http://www.harepoint.com/Products/HarePointWorkflowExtensions/ ) – about 200 new workflow activities, including free ones.
Why do you keep removein comments?
Post a Comment