Register  Login       Search  
Forum  
 
  
 
Forum  Forum     
 
SearchForum Home
  XML Lab Products  nxslt  How to use XPat...
 How to use XPath Functions?
 
eeidfn
4 posts
Joined
10/11/2006

How to use XPath Functions?
Posted: 11 Oct 06 12:49 PM (United States)

Hi,


I have the following XSL, given below.  In XML Spy, I get the absolute values.  In nxslt2, I get this error:


An error occurred while executing transformation: System.Xml.Xsl.XslTransformException: Cannot find the script or external object that implements prefix 'http://www.w3.org/2005/02/xpath-functions'.


<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes">
 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>


 <xsl:template match="/Output/Route">
  <html>
   <head>
   </head>
   <body>
    <xsl:for-each select="Frame">
     <tr><td>Abs=<xsl:value-of select="fn:abs(@Longitude)"/></td></tr>
    </xsl:for-each>
   </body>
  </html>
 </xsl:template></xsl:stylesheet>


Any hints will be helpful.


Thank you.

olegt
85 posts
www.xmllab.net
Joined
2/25/2005

Re: How to use XPath Functions?
Posted: 19 Oct 06 12:53 AM (Israel)
Sorry, but nxslt2 is just a wrapper around .NET 2.0 XslCompiledTransform class. That "2" stands for .NET 2.0, not XSLT/XPath 2.0. .NET doesn't support neither XPath 2.0 nor XSLT 2.0 yet.
Oleg Tkachenko, Microsoft MVP for XML, MCPD
http://www.XmlLab.Net | http://blog.tkachenko.com
  XML Lab Products  nxslt  How to use XPat...
Forum Home  Search