Hi Guys
I hope this is a simple one for you.
I am basically displaying data onto my xml page using the following line of code:
<xsl:value-of select="carmanu facturer" />
An example of the resulting output would be, "Ford"
However, the "carmanufacture r" field in my table sometimes contains 2 words, for example, "Land Rover". Thus, the resulting output is, "Land Rover".
The output on my page is also hyperlinked and so the code is as follows:
<a class="type1" href="http://www.mywebsite.c o.uk/{carmanufacture r}.asp"><xsl:va lue-of select="carmanu facturer" /></a>
The problem I have is that for the hyperlink url I would like to replace the spaces between the 2 words with a "-". Thus my link would point to:
http://www.mywebsite.c o.uk/Land-Rover.asp
I have tried using something like this "<xsl:value-of select="replace (carmanufacture r, ' ', '-')" />" but I get the following error:
-------------error----------------
msxml3.dll error '80004005'
'replace' is not a valid XSLT or XPath function. -->replace(carman ufacturer, ' ', '-')<--
--------------error end------------
Looking at various forums they say this error occurs because I have XSLT 1.0 and not XSLT 2.0 but I am unsure what version I've got. If the code I am using should work then I assume that I have version 1.0??? However, I do not know what code I need to use to make this work.
Any ideas would be fully appreciated.
Best regards
Rod from the UK
2 6952 jkmyoung 2,057
Recognized Expert Top Contributor
Hi JKMYoung
Thank you for your help.
The translate functon worked perfectly!
Best regards Rod
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Barnes |
last post by:
Does anyone know of a good way to use the JavaScript string.replace() method in an ASP form?
Here is the scenario:
I have a form that cannot accept apostrophes. I want to use the replace() so that the apostrophe is
automatically replace with two '' . Reason being--SQL Server does not like apostrophes being sent to database.
I've tried to do this on the server side in the SQL area of the ASP page by writing a function (with some great...
|
by: Danny |
last post by:
I need an asp command to strip out from a string all extra punctuation such
as apostrophe, comma, period, spaces dashes, etc etc and just leave the
letters.
Can anybody give me some ideas?
Thanks
|
by: higabe |
last post by:
Three questions
1)
I have a string function that works perfectly but according to W3C.org
web site is syntactically flawed because it contains the characters </
in sequence. So how am I supposed to write this function?
String.replace(/</g,'<');
|
by: Brian |
last post by:
I want to use regxp to check that a form input contains at least 1
non-space charcter. I'd like to only run this if the browser supports
it. For DOM stuff, I'd use
if (documentGetElementById) {}
Is there an object/feature detection I can use to check for regxp string
manipulation support?
--
|
by: Dave |
last post by:
I have an Access 2K application that is distributed to about a dozen
users (all with identical NT environments and identical Access
versions, object libraries and service packs). I am using the VBA
Replace function in a couple of queries to reformat some data. The
application works flawlessly on 8 of the workstations, but on the
other 4 throws a "Unrecognized function Replace" error when the
queries in question are encountered.
I have...
| |
by: pembed2003 |
last post by:
Hi all,
I need to write a function to search and replace part of a char*
passed in to the function. I came up with the following:
char* search_and_replace(char* source,char search,char* replace){
char* result;
size_t l = strlen(source), r = strlen(replace), i;
int number_of_replaces = 0;
for(i = 0; i < l; i++){
if(source == search)
|
by: Paul |
last post by:
hi, there,
for example,
char *mystr="##this is##a examp#le";
I want to replace all the "##" in mystr with "****". How can I do this?
I checked all the string functions in C, but did not find one.
|
by: djc |
last post by:
I need to prepare a large text database field to display in an asp.net
repeater control. Currently I am replacing all chr(13)'s with a "<br/>" and
it works fine. However, now I also want to be able to replace TAB's with
" "'s to preserve the user's indentation. My questions are:
1) even though I'll probably look it up before I get a reply.... whats the
vb code for TAB character?
2) more importantly; do I have to run this large field...
|
by: Lauren Wilson |
last post by:
Hi folks,
We have a need to replace sub strings in certain message text. We use
the Office Assistant to display help and often use the imbedded
formatting commands. Those of you who have used them know they look
like this: "{cf 5}" or "{cf 0}" or "{ul 1}" or "{ul 0}", etc. The
commonality they have is that they are always 6 charters long and
always begin and end with curly brackets.
This all works great if the user is running the...
|
by: pamelafluente |
last post by:
I need to replace all the occurences of a string within another string
(or stringbuilder):
Function ReplaceInsensitive(ByVal InputString As String, _
ByVal SubstringReplaced As
String, _
ByVal Replacement As
String) As String
'...
End Function
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |