Problem with web custom control integration: Prefix 'blah' is not defined Options
grahamstr
Posted: Monday, March 05, 2007 6:20:54 PM
Rank: Newbie

Joined: 3/5/2007
Posts: 3
Hey Guys,
I've been experimenting some with the .net control integration. It looks so easy on the little screen cast (great job on that BTW) but there must be some little detail that I am missing. I get to the point of adding an xsl:value-of that references my exposed method, but then when I try to save the xslt, I get an xslt compile error. if I then click "ignore error" as someone suggested in a previous post, the error just moves to my browser when i view my site :)

My class extends WebControl. my method is public, static, and returns a string.

here's the error that I get (I'm running umbraco v 2.1.6 (Assembly version: 1.0.2490.18968))


System.Xml.Xsl.XsltException: Prefix 'TestUmbracoLibrary.Control' is not defined.
at System.Xml.Xsl.XsltOld.InputScopeManager.ResolveNonEmptyPrefix(String prefix)
at System.Xml.Xsl.XsltOld.XsltCompileContext.LookupNamespace(String prefix)
at System.Xml.Xsl.XsltOld.XsltCompileContext.ResolveFunction(String prefix, String name, XPathResultType[] argTypes)
at MS.Internal.Xml.XPath.FunctionQuery.SetXsltContext(XsltContext context)
at System.Xml.Xsl.XsltOld.Processor.GetValueQuery(Int32 key, XsltCompileContext context)
at System.Xml.Xsl.XsltOld.Processor.ValueOf(ActionFrame context, Int32 key)
at System.Xml.Xsl.XsltOld.ValueOfAction.Execute(Processor processor, ActionFrame frame)
at System.Xml.Xsl.XsltOld.ActionFrame.Execute(Processor processor)
at System.Xml.Xsl.XsltOld.Processor.Execute()
at System.Xml.Xsl.XsltOld.Processor.Execute(TextWriter writer)
at System.Xml.Xsl.XslTransform.Transform(XPathNavigator input, XsltArgumentList args, TextWriter output, XmlResolver resolver)
at System.Xml.Xsl.XslTransform.Transform(IXPathNavigable input, XsltArgumentList args, TextWriter output, XmlResolver resolver)
at umbraco.cms.presentation.developer.editXslt.Page_Load(Object sender, EventArgs e) in C:\data\umbraco\umbraco2.1\umbraco\presentation\umbraco\developer\editXslt.aspx.cs:line 77

I appreciate the help!

Graham

mortenbock
Posted: Monday, March 05, 2007 8:12:49 PM

Rank: Addict

Joined: 7/19/2006
Posts: 819
Location: Århus, Denmark
This is just a shot in the dark, but did you register the extension in the /config/xsltExtensions.xml file?

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

mortenbock
Posted: Monday, March 05, 2007 8:19:13 PM

Rank: Addict

Joined: 7/19/2006
Posts: 819
Location: Århus, Denmark
Just found this... might help? Or have you been through this allready?

http://en.wikibooks.org/wiki/Umbraco/Create_xslt_exstension_like_umbraco.Library_in_C

Morten Bock - Level 2 certified - MVP 2008/2009 - My danish blog with a few english posts

grahamstr
Posted: Monday, March 05, 2007 8:32:45 PM
Rank: Newbie

Joined: 3/5/2007
Posts: 3
Thanks, I hadn't seen that page on the wiki... I'll give that a shot. yes I registered the DLL in the xltExtensions.xml - and, my type is showing up when i do the "get extension" button. so it can find my method signature, etc.

thanks for the lead- i'll give the "like umbraco.Library in C" tuturial a try.

Graham
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.