SharePoint DVWP: view XML results of your query
When you create your own XSLT transformations in the data view web part you need to know the format of the XML resulting from the specifed query. Given this XML you can expiriment outside of FrontPage with an XSL tool like XSelerator to do real XSLT debugging. Note that outside of FrontPage (or online editing of the DVWP) you can’t use functions in the ddwrt namespace.
To get the XML results you can use a simple XSLT transformation. Edit the XSLT part of the DVWP via frontpage, or press the XSL Editor “Source Editor…” button in the toolpane of the data view web part:
Now replace the current xslt transformation with the following code:
To get a view like this:
Or if you want to have a more fancy view like this:
use the following code which utilizes dp.SyntaxHighlighter
With this more advanced view I had FrontPage crashing on save of the code. So maybe you can better stick to the simple view. Another problem I had with the advanced view is that the output was not always rendered correctly, I thing due to a shortcomming in the syntax highlighting code.
One problem is that any typo in your query will result in an error message, use the back button to get back to your edit screen again and solve the problem (if your working with the online view). With FrontPage you can directly correct the problem because you have a complete source code view.