473,669 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XSL substitution

Hi Group,

I'm a newbie in XML and my problem/question should be quite simple to
solve....

1) an XML file with content like

<location>fil e://path/to/something1</location>
<location>fil e://path/to/something2</location>
<location>fil e://path/to/something3</location>

2) an XSL file to produce an .html page.
My problem : I need to substitute "file:/" with "http://web_site.com"

For now on, I use a dirty trick : changing the XML file with "sed"....

I'd like to make this substitution in my .XSL file...

Thanks in advance for your ideas.

M.

Jul 20 '05 #1
2 1725


StopBsod wrote:

I'm a newbie in XML and my problem/question should be quite simple to
solve....

1) an XML file with content like

<location>fil e://path/to/something1</location>
<location>fil e://path/to/something2</location>
<location>fil e://path/to/something3</location>

2) an XSL file to produce an .html page.
My problem : I need to substitute "file:/" with "http://web_site.com"

For now on, I use a dirty trick : changing the XML file with "sed"....

I'd like to make this substitution in my .XSL file...


XPath has some functions for string processing e.g.
concat('http://www.example.com/', substring-after(location, 'file://'))
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Le Sat, 17 Jan 2004 19:15:28 +0100, Martin Honnen a écrit*:

My problem : I need to substitute "file:/" with "http://web_site.com"

XPath has some functions for string processing e.g.
concat('http://www.example.com/', substring-after(location, 'file://'))


Great, Thanks Martin !

Worked "out of the box" :

http://www.marcfrei.net/zicmu/rhythmdb.xml

(3 Mb file... ;-)

M.
Jul 20 '05 #3

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

Similar topics

6
1952
by: Paddy | last post by:
Hi, I got tripped up on the way eval works with respect to modules and so wrote a test. It seems that a function carries around knowledge of the globals() present when it was defined. (The .func_globals attribute)? When evaluated using eval(...) the embedded globals can be overridden with
0
1777
by: Justin | last post by:
Hi, First off, I must apologise for cross posting. I am having difficulty creating a pdf document using perl cgi to do substitution for multiline pdf form fields. I created a pdf template/file with substitution variables. The file is then read and variables substituted using pattern matching. When I view the pdf multiline form field using acrobat, the field seems to be truncated. Upon view the properties of the multiline text field, I...
1
5146
by: Jacob Grydholt Jensen | last post by:
I am trying to learn iSQL*Plus for the 1Z0-007 exam. I am having a bit of problems with the substitution variables. My understanding was that they behave as in SQL*Plus, but my experiments beg to differ. I log on to the sample schema 'hr' and enter the following statements: -- statements begin set verify on define name = K%
0
1604
by: EJ | last post by:
Is there a way to specify a substitution variable that can be used in several places in the app.config file (like you can do in Ant/NAnt build files)? For example, if there is part of a file path that I specify in several of the appSettings key values, can I somehow specify that path once, and just insert a substitution variable of some sort (e.g., "${path}") and have it get substituted at run-time? I could just separate them into...
2
2007
by: John Carron | last post by:
Hi All, I have written a simple schema (see below) that uses substitution groups. I don't know if this the correct usage because I'm fairly new to xml schema. The structure is as follows: Request Report
1
2376
by: kollareddy | last post by:
Hi all, I am new to xml/xsd world. I want to know the differences between complex type and element being abstract and if both can be declared so, in case of substitution goups.Also can xsi:type usuage allowes in instance doucments in case of substitution goups. I tried using abstarct complex type/element with substitution groups and I attached the code below. In XX1.xsd which is imported and a reference to complex abstract type is made...
4
6913
by: Don | last post by:
I think "macro substitution" is the correct term for what I want to do, but, to be sure, here is a description of what I'd like to know is possible: I want to be able to create a create an object of a type whose name is stored in a constant. For example: Const FORM_NAME_1 as String = "frmThisForm" Const FORM_NAME_2 as String = "frmThatForm"
5
4414
by: Murali | last post by:
In Python, dictionaries can have any hashable value as a string. In particular I can say d = {} d = "Right" d = "Wrong" d = "test" In order to print "test" using % substitution I can say
4
12074
by: Ian | last post by:
Hi, Hopefully a simple question but my brain is hurting... I want to make a regex substitution, using search and replace patterns contained in variables. What I want to do is: $f = "fred.abc"; $f =~ s/(.*)\.abc/$1.def/; print "$f\n";
2
1179
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
In our application consisting of several custom user controls we want one of these controls to be excluded from the page cache. For this I tried to use the substitution control for output cache substitution. But this control renders at the top of the page before the <HTMLtag, just like using response.write. When I turn off the page cache, it works correctly. What could be the reason?
0
8383
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,...
0
8895
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8658
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
7407
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
6210
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
4206
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
2797
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
2
2032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1788
bsmnconsultancy
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...

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.