Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Problem loading the Function Namespace in XSLT [Thread Next] Re: Problem loading the Function Namespace in XSLTTo: NULL Date: 1/2/2007 2:41:00 PM Gaz wrote: > I'm trying to use the fn:ends-with string function but I'm getting the > following error: "Cannot find the script or external object that > implements prefix 'http://www.w3.org/2005/xpath-functions'." > > I've added the namespace to my xsl stylesheet declaration: > > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:fn="http://www.w3.org/2005/xpath-functions"> > > And have the following code: > > <xsl:if test="fn:ends-with($nameA, 'Id')"> > <!-- ### Do Something ### --> > </xsl:if> XPath 2.0 is not yet a W3C recommendation so currently there is not much support for XPath 2.0. It looks like you are trying to use an XPath 2.0 function in an XSLT 1.0 stylesheet (why do you use version="1.0"?) and you use an XSLT processor that does not support the XPath 2.0 function ends-with. The XPath 1.0 string functions are documented here: <http://www.w3.org/TR/xpath#section-String-Functions> XSLT 1.0 and XPath 1.0 is what is currently supported by Microsoft products like MSXML 3, 4, 5, 6 and .NET XslTransform, XslCompiledTransform. There is also support for some extension functions but not for XPath 2.0 functions. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
