Re: [xslt] confusing error message "function format-date bound to undefined prefix date"



On Wed, Mar 25, 2009 at 12:44:38PM +0100, Michael Ludwig wrote:
> Viktor Stujber schrieb:
>> By reducing the application I now have a minimalistic test case which
>> reproduces the issue. The problem occured because the author included
>> the template file "str.replace.function.xsl" (which implements
>> str:replace) even though libxslt provides its own builtin str:replace
>> function. Removing the include makes the problem go away.
>
> I can confirm that. Maybe redefining a built-in extension function isn't
> supported. Bottom line: Use built-in functionality.
>
>> The full test case is provided as an attachment to this mail. What I'm
>> still wondering about is why the "split into two lines" version still
>> runs fine even though it's basically the same thing as the "one-liner"
>> version
>
> A mistery. Running with --verbose yields more information, but I can't
> see what's going on.
>
>> and why libxslt is yelling about an unbound prefix 'date' when it
>> actually is bound.
>
> It actually is bound. This error is a mistery to me.

  Very complex, for some reason during the evaluation of
"date:format-date(str:replace('2009-03-23T13:44:00Z', ' ', 'T'), 'HH:mm:ss | dd. MMMM, yy')"

  the XPath context used for the XSLT transformation seems to not being
restored to what it should be and we keep the namespace context list of
str.replace.function.xsl ... Still need some exploration,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]