473,799 Members | 3,267 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Translate() doesn't work

Hi,

I am using the Translate() function in one of the .XSLT file to remove the
spaces, like this:
<xsl:for-each select=".//Illustration">
<xsl:value-of select="transla te(./@illusName, ' ', '')"/>
….

This works fine with command line msxsl and XML editors like XMLSpy.
However, if you use .NET's
XSLTransform.Tr ansform() method to access the same .xslt file, it doesn't
remove the spaces.

I also tried the following workarounds, but it still doesn't work:
<xsl:element name="{translat e(./@illusName, ' ', '')}">
<xsl:value-of select="transla te(./@illusName, ' ', '')"/>

Is this a known problem with .NET?
Plz help!
Feb 23 '07 #1
1 2562
Gaurav wrote:
This works fine with command line msxsl and XML editors like XMLSpy.
However, if you use .NET's
XSLTransform.Tr ansform() method to access the same .xslt file, it doesn't
remove the spaces.

I also tried the following workarounds, but it still doesn't work:
<xsl:element name="{translat e(./@illusName, ' ', '')}">
<xsl:value-of select="transla te(./@illusName, ' ', '')"/>

Is this a known problem with .NET?
I can't reproduce the problem with a simple example and .NET 1.1. Can
you post a minimal XML input document, minimal XSLT stylesheet and your
..NET code that runs the transformation?
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Feb 23 '07 #2

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

Similar topics

4
4954
by: +Vice | last post by:
Can anyone help me translate this statement from using the legacy outer joins to the SQL-92 standards? Select CA.* From Customer C, Shipper S, Customer_Order CO, Cust_Address CA Where CA.Customer_ID =* CO.Customer_ID and CA.Addr_No =* isnull(S.Ship_To_Addr_No,CO.Ship_To_Addr_No) and C.ID = CO.Customer_ID and (S.Shipped_Date between '1/1/2003' and '12/31/2003') Try as I may, I simply can't find a working left, right, or full outer
1
11167
by: Joe | last post by:
Hi all Is there a TSQL function like Oracle's Translate function? Where: Translate('13,000 Miles','abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ, ',' ') would return '13000'? I'm trying to extract a number from a string. REPLACE doesn't quite do what I want.
4
2172
by: Gadrin77 | last post by:
I have data that looks like <Root> <Main Value="Line1|Line2.|Line3|Line4.|Line5"/> </Root> I'm using Translate(@Value, "|.", ",")
1
1958
by: Martin | last post by:
Shown below is the body of a web page I'm developing. When it loads, a socket connection is established back to a socket that's on my server. I can then send a message from the server and it will show up on this page. This works as intended (IE only, of course). I'm going to add some functionality to this script and I want to do it in javascript - I'd like to do this part in javascript also. Can someone tell me what I need to do to...
6
1684
by: VBTricks.de.vu Webmaster | last post by:
Hello, in VB6 I used to translate my application by setting the tag-property of all controls, menu-entries... to a number which has been linked to a string (array). Then I went through all controls or a form, checked the tag-property and changed the caption-property to the lokalized string. This was working for me fine. Therefore I wanted to use the same implementation in VB.net. Unfortunately I found out, that menuitems and some other...
6
2784
by: bobueland | last post by:
The module string has a function called translate. I tried to find the source code for that function. In: C:\Python24\Lib there is one file called string.py I open it and it says
1
9393
by: peterbe | last post by:
This has always worked fine for me. Peter fine Now if I do it with a unicode string: Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/lib/python2.4/string.py", line 493, in translate return s.translate(table, deletions) TypeError: translate() takes exactly one argument (2 given)
9
3114
bvdet
by: bvdet | last post by:
I have done some more work on a simple class I wrote to calculate a global coordinate in 3D given a local coordinate: ## Basis3D.py Version 1.02 (module macrolib.Basis3D) ## Copyright (c) 2006 Bruce Vaughan, BV Detailing & Design, Inc. ## All rights reserved. ## NOT FOR SALE. The software is provided "as is" without any warranty. ############################################################################ """ Class...
3
649
by: muybluie | last post by:
Hello All, I am trying something so simple, I have no idea why it doesn't work! create table test1 (c1 VARCHAR(16)); insert into test1 values( '12154846' ); select translate(c1, '5', 'A') from test1; You'd think I would get a modified version of the string in column c1, but nothing happens. The select statement returns the string
0
9688
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, 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...
0
9546
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10243
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,...
0
10030
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 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...
0
9078
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, 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...
1
7570
isladogs
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...
0
6809
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();...
0
5467
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...
1
4146
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 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.