To create my own XSLT extension class so I can use .net methods in my xslt select statements. I built the extension, copied the DLL into the bin folder of umbraco and in the XSLT editor I can see my class and method in the "insert xslt:value-of" - get extensions window and insert the script into the XSLT file. Problem is, when I go to save the file I get the following error:
Error occured
System.Xml.Xsl.XslLoadException: Prefix 'umbracoSiteModulesCS' is not defined. An error occurred at c:\inetpub\umbracoSite\xslt\634526278492824590_temp.xslt(8,3). at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver) at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)
Custom Umbraco XSLT Namespace - Prefix not defined
Hi all!
I am following the video here:
http://umbraco.com/help-and-support/video-tutorials/developing-with-umbraco/easier-xslt-and-rest-extensions/xsltextension-attribute/TVPlayerPopup
To create my own XSLT extension class so I can use .net methods in my xslt select statements. I built the extension, copied the DLL into the bin folder of umbraco and in the XSLT editor I can see my class and method in the "insert xslt:value-of" - get extensions window and insert the script into the XSLT file. Problem is, when I go to save the file I get the following error:
Error occured
Any ideas why this is happening?
Thanks,
Max.
Hi Max,
Unfortunately, for existing XSLT files, the new namespaces are not automatically added to the header, so you will need to add it manually.
Do be sure to check if you have other namespaces that you use (e.g. the EXSLT ones) ... you'd need to keep those in there too!
Cheers, Lee.
Thanks! That did it. Ended up re-creating the xslt file which added the following:
xmlns:*DLL Name*.*Project Name*.*Class Name*="urn:*DLL Name*.*Project Name*.*Class Name*"
And to "exclude-result-prefixes" added:
*DLL Name*.*Project Name*.*Class Name*
is working on a reply...