473,396 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Referencing Additional Namespaces XSL

SR
I need to use a string replace function in my XSL document. I found a W3
library that has numerous string functions such as fn:replace(). When I try
using the namespace, I get an error

"Cannot find the script or external object that implements prefix
'http://www.w3.org/2005/02/xpath-functions'.

I am using VB, an XMLDocument object, an XSLCompiledTransform object, and an
XmlTextWriter to store the transformation.

Here is the start of my XSL document:

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/02/xpath-functions">

<xsl:template match="/">
<html>
<body style="margin-left:35;">
....
<xsl:value-of select="fn:replace(//xml/fields/CEADR1, 'abc',
'def')"/><br/>
....

Am I doing something wrong? Is this namespace not compatible with .NET 2.0?
Help!

SR
Mar 20 '07 #1
3 6285
SR wrote:
I need to use a string replace function in my XSL document. I found a W3
library that has numerous string functions such as fn:replace(). When I try
using the namespace, I get an error

"Cannot find the script or external object that implements prefix
'http://www.w3.org/2005/02/xpath-functions'.
You have probably looked at the XPath 2.0 specification or its working
drafts. The .NET framework class libraries support XSLT and XPath 1.0.
If you want XSLT and XPath 2.0 support then you need to look into Saxon
for .NET from <http://www.saxonica.com>.

You might also want to check EXSLT.NET on
<http://www.codeplex.com/Wiki/View.aspx?ProjectName=MVPXMLas EXSLT has
some powerful string manipulation functions too.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 20 '07 #2
SR
Thanks.

I am looking at the XPath 2.0 specs. They came out in 2005. Silly me
thinking that Visual Studio 2005 would have 2005 specs in them...duh.

Thanks again.

"Martin Honnen" <ma*******@yahoo.dewrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
SR wrote:
>I need to use a string replace function in my XSL document. I found a W3
library that has numerous string functions such as fn:replace(). When I
try using the namespace, I get an error

"Cannot find the script or external object that implements prefix
'http://www.w3.org/2005/02/xpath-functions'.

You have probably looked at the XPath 2.0 specification or its working
drafts. The .NET framework class libraries support XSLT and XPath 1.0. If
you want XSLT and XPath 2.0 support then you need to look into Saxon for
.NET from <http://www.saxonica.com>.

You might also want to check EXSLT.NET on
<http://www.codeplex.com/Wiki/View.aspx?ProjectName=MVPXMLas EXSLT has
some powerful string manipulation functions too.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Mar 20 '07 #3
SR wrote:
I am looking at the XPath 2.0 specs. They came out in 2005.
XPath 2.0 became a W3C recommendation this year:
<http://www.w3.org/TR/xpath20/>

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 21 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Steven Bethard | last post by:
In the "empty classes as c structs?" thread, we've been talking in some detail about my proposed "generic objects" PEP. Based on a number of suggestions, I'm thinking more and more that instead of...
3
by: Rea Peleg | last post by:
Hello I'd like to use .NET framework namespaces in client side java script. For example i'd like to import System.Activator, in order to call Activator.CreateInstance() method inside a client side...
11
by: Milind | last post by:
Hi, I was trying to implement a composition relation, somthing of the following type: class A { public: class B {
12
by: Mark Broadbent | last post by:
Hi guys, just going through remoting at the moment and a couple of questions relating to .net in general has surfaced. Firstly I have seen in the designer that for the namespace and many of its...
4
by: TWEB | last post by:
I think I may have an IIS / ASP.Net Configuration issue that I need some guidance with resolving. Here's the problem: a) I have a .stm file. b) I referenc a .aspx file on this .stm file using a...
2
by: Axel | last post by:
Hi, a question about something that seems very simple at first glance: is it possible to reference other controls of a subform in a query window without referencing through the parent form? I...
5
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
I am experiencing a lot of speed issues on initial app loads where we are referencing 3rd party 1.1 assemblies from 2.0 code. Those 1.1 assemblies reference things like System.Windows.Forms...
1
by: dignan.tenenbaum | last post by:
Hello, I'm using the XmlReader.ReadOuterXml() method to return the string representation of an xml node. The XmlReader is created with a file path and a XmlReaderSettings object. This was...
3
by: =?Utf-8?B?a3lvbmc=?= | last post by:
Quick question. Say I have a project against the 2.0framework. I also have a dll compiled against 3.5. If I reference the 3.5 dll in the 2.0 project, how would that work? So I'm thinking that...
1
by: Tom | last post by:
My unsigned DLL works in my project that references it as long as I set Copy Local = true. Now I have signed the DLL with the sn.exe generated keys but have not yet moved the DLL into the GAC. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.