Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Problem loading the Function Namespace in XSLT

From: Martin Honnen <mahotrash@-----.-->
To: 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent