2

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 – Anders Rask May 1 '11 at 8:54
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 – russellg May 2 '11 at 22:55
0

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, privacy policy and cookie policy

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