Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Wed, 6 Feb 2008 01:18:00 -0800,    group: microsoft.public.xsl        back       


Xpath functions in XSL not recognised by ASP.NET 2.0   
Hi, 

I’m trying to display the contents of an xml file using an xslt file.  I’m 
using ASP.NET.2.0 and the xsltCompiledTransform method in order to achieve 
the transformation. Everything works fine when I don’t have xPath functions 
in my xslt. But when I declare the namespace 
‘xmlns:fn=http://www.w3.org/2005/02/xpath-functions' and I use Xpath 
functions in my XSLT it comes up with the following error message : ‘Cannot 
find the script or external object that implements prefix 'fn'.

Could anyone please tell me what’s happening and why? Is there a way I can 
surpass that? 

Your help will be much appreciated!!!

Thank u in advance,

Newbie in trouble….
date: Wed, 6 Feb 2008 01:18:00 -0800   author:   entropia

RE: Xpath functions in XSL not recognised by ASP.NET 2.0   
Actually, (AFAIK) the correct namespace is 
"http://www.w3.org/2005/xpath-functions/", but that's for XPath 2'0, which is 
not currently supported by MSXSL.

Unless you're actually using XPath 2'0 functions you can omit the namespace 
declaration as long as you work with XSLT v. 1'0 (and you've properly 
declared the xsl namespace as "http://www.w3.org/1999/XSL/Transform").

If, on the other hand, you do need XPath 2'0 functions and would still 
prefer to use MSXSL, you could:
1) achieve the same functionality from the supported XPath 1'0 functions; or
2) achieve the needed functionality by designing your own extended functions 
(e.g. using VBS, JS, or .Net).


ML

---
Matija Lah, SQL Server MVP
http://milambda.blogspot.com/
date: Wed, 6 Feb 2008 03:54:01 -0800   author:   ML

Re: Xpath functions in XSL not recognised by ASP.NET 2.0   
Unfortunately Microsoft doesn't support XPath 2.0 or XSLT 2.0 yet.
Neither .NET nor MSXML support them.

One alternative would be using EXSLT functions instead of XPath 2.0 (see 
http://www.mvpxml.org)
Second option is to use Saxon.NET (http://saxon.sourceforge.net) for 
doing transformations.

-- 
Oleg

entropia wrote:
> Hi, 
> 
> I’m trying to display the contents of an xml file using an xslt file.  I’m 
> using ASP.NET.2.0 and the xsltCompiledTransform method in order to achieve 
> the transformation. Everything works fine when I don’t have xPath functions 
> in my xslt. But when I declare the namespace 
> ‘xmlns:fn=http://www.w3.org/2005/02/xpath-functions' and I use Xpath 
> functions in my XSLT it comes up with the following error message : ‘Cannot 
> find the script or external object that implements prefix 'fn'.
> 
> Could anyone please tell me what’s happening and why? Is there a way I can 
> surpass that? 
> 
> Your help will be much appreciated!!!
> 
> Thank u in advance,
> 
> Newbie in trouble….
> 
>
date: Wed, 06 Feb 2008 14:14:21 +0200   author:   Oleg Tkachenko

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us