SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 – Anders Rask May 1 '11 at 8:54

Here is a much better example by Ton Stegeman:

share|improve this answer
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 – russellg May 2 '11 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:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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