I'm trying to figure out how to add my own XSLT extensions to be used in the DataFormWebPart on MOSS 2007, kind of like a custom ddwrt library.

A comment on this post seemed to say that I could register my own assembly in the pages/Controls section of my web.config, and then use the functions in my XSLT.

I tried doing it but my DFWP just keeps throwing an error in SharePoint Designer saying "Namespace Mycompany.Customxsltextensions contains no functions".

Is it possible to add custom XSLT extensions thru the web.config? Is there any documentation on this?

  • Please post XSLT (especially tagprefix and namespace and how you call it in template). Also post your public static method, and describe how you deploy it May 1, 2011 at 8:54

2 Answers 2


Here is a much better example by Ton Stegeman: http://www.tonstegeman.com/Blog/Lists/Posts/Post.aspx?ID=85

  • Thanks Anders, I did see that post and its definitely a better explanation of doimg this by extending the DVWP class. I was looking for info on how to do this by regisrterring an assembly in the web config pages/controls section, and using it with the out-of-the-box dvwp
    – RussGove
    May 2, 2011 at 22:55

You can't do that just by going to the web.config, you need to subclass DataFormWebPart and register a class (or classes) that holds your methods that you want to make available. See an example here: http://weblogs.asp.net/ricardoperes/custom-xslt-functions-in-sharepoint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.