Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

So:

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,
System.Collections.Generic.IList`1[System.Xml.XPath.XPathItem][])
Type: System.Xml.Xsl.XslTransformException
Source: System.Data.SqlXml
Description: Cannot find the script or external object that implements prefix 
'http://schemas.microsoft.com/WebParts/v2/DataView/runtime'.

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="http://www.w3.org/1999/XSL/Transform"
 xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime">

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

Note:

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

2 Answers 2

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("http://schemas.microsoft.com/WebParts/v2/DataView/runtime", 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

Your Answer

 
discard

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.