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 use the ddwrt:FormatDateTime function in an XSL transform, but I'm getting the following error:

Exception details:
Method: System.Collections.Generic.IList`1[System.Xml.XPath.XPathItem]
InvokeXsltLateBoundFunction(System.String, System.String,
Type: System.Xml.Xsl.XslTransformException
Source: System.Data.SqlXml
Description: Cannot find the script or external object that implements prefix 

I do have the namespace defined. Here's my header (except it's all on one line in my file):

<xsl:stylesheet version="1.0" xmlns:xsl=""

Why would it be throwing this error? This is my first XSL transform. Is there something simple I'm overlooking?


Following the path to the schema throws an exception when I try to navigate there from my browser... Is it just down? Is there a new schema?

share|improve this question
Per the FAQ we do not accept questions about commercial, third-party products. If possible please reproduce the problem or pose the question so that it does not involve a third-party product, or ask your question using the vendor's support site if it is product-specific. Thanks. – SPDoctor Apr 30 '12 at 19:32
Great. Thanks for editing. – SPDoctor Apr 30 '12 at 20:07

I'm not sure the lightning conductor webpart supports the ddwrt extensions. Unfortunely, MS marked this class as internal, so, when I wanted to use them in my own XSLT, I had to reflector the code and put it into my own class and then register my own class as the extension. I doubt that lightning tools did this but they could have.

XsltArgumentList xslArgs = new XsltArgumentList();
DdwRuntime runtime = new DdwRuntime();  //My own class reflectored from SharePoint
runtime.View = view;
runtime.List = list;
runtime.Web = web;
runtime.ListItem = listItem;
xslArgs.AddExtensionObject("", runtime);
share|improve this answer
Yeah, that's what I figured the more I read about... sadly they also didn't register the "xls:fn" extension either... what garbage. That's a massive oversight and heavily limits customization of their tool. – RJ Cuthbertson Apr 30 '12 at 18:08
Steve, would you be willing to share your DdwRuntime class? I'm attempting to do the same but as usual the Microsoft classes have a lot of references to other internal or private classes. I'm curious how much you implemented? – Chloraphil Mar 17 at 15:31

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.