Debug your XSLT in Visual Studio.
XsltDb is a universal application block. What should it be like? I hate setings. I love coding. So XsltDb has only one setting: the XSL code. But if you have to code you need at least colorer, intellisence and debugger. And you do have all these tool with XsltDb.
Actually you have 2 tools:
- XsltDb Rich Client
- XsltDb Debugger
Rich client is standalone tool that connects to a particular portal and displays all instancres of XsltDb module at the portal.
But one extremely useful tool is debugger. As you know MS Visual Studio supports step-by-step XSLT debugging. Here I show you how you can utilize this debugger to debug XsltDb module. Production environment debugging is not supported for the moment so you need
to setup a development environment. In other words you need to open your DNN site as Visual Studio solution. You can do ia sa follows:
- Download and install DNN Visual Studio Starter Kit.
- Create a DNN website project and setup database.
- Install XsltDb module and create an instance of it.
After that you must enable XsltDb module instance for debugguing. Click Edit XSLT and write the following preprocessor command:
Now you can navigate to the XsltDb source code file App_Code\XsltDb\XsltDbUtils.cs. Find
function and create a breakpoint at line
t.Transform(xmlFile, xslArg, sw);
Now is pretty good time to debug. Press F5 or attach to web server precess (w3wp.exe, WebDev.WebServer.exe or what you are using) and navigate to a page with debugging module. Visual Studio should stop at breakpoint. After that just press
and step into the XSLT.
And finally debug XSLT!