One of the downsides of XSL extensions is that an entire Sitecore solution needs to be restarted both when a new extension is registered (web.config change) and existing extension is modified (recompilation). Compilation itself can also be a burden. Plain XSLTs, in contrary, are easy to modify, and the result is immediately visible on the website.
Dynamic extension compilation is an attempt to solve this and make extensions more viable. It will compile and register all extensions in /App_XslExtensions (configurable) folder in Sitecore root both when Sitecore starts, and when extension is created or updated.
Below is the example of such extension file:
using Sitecore.DynamicXslExtensions.Attributes;
namespace Sitecore.DynamicXslExtensions.Tests
{
[XslExtension("http://www.sitecore.net/testnamespace")]
public class TestExtension
{
public string helloWorld()
{
return "Hello, World!"
}
}
}
If the file is placed inside the /App_XslExtensions folder, it will be compiled automatically, and you can register the http://www.sitecore.net/testnamespace extension as usual. What is not usual is that you can tweak the helloWorld() method in any file editor (or using Sitecore IDE) and see the changes live on the website.
Underlying process is similar to how Sitecore compiles XML controls. And just as in XML control code, you can modify a list of assembly references during automatic compilation using ui/references section of web.config.
Installation is as simple as I could make it: install the package, and add
<processor type="Sitecore.DynamicXslExtensions.Loader, Sitecore.DynamicXslExtensions" />
to pipelines/initialize in web.config.
Download Package.