XSL substitution

S

StopBsod

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>file://path/to/something1</location>
<location>file://path/to/something2</location>
<location>file://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.
 
M

Martin Honnen

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>file://path/to/something1</location>
<location>file://path/to/something2</location>
<location>file://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://'))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top