XSL substitution

Discussion in 'XML' started by StopBsod, Jan 17, 2004.

  1. StopBsod

    StopBsod Guest

    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.
     
    StopBsod, Jan 17, 2004
    #1
    1. Advertising

  2. 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://'))
    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Jan 17, 2004
    #2
    1. Advertising

  3. StopBsod

    StopBsod Guest

    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.
     
    StopBsod, Jan 18, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Flood
    Replies:
    0
    Views:
    1,021
    Kevin Flood
    Sep 8, 2004
  2. Kevin Flood
    Replies:
    1
    Views:
    2,738
    Kevin Flood
    Sep 13, 2004
  3. Klaus Friese
    Replies:
    0
    Views:
    468
    Klaus Friese
    Nov 22, 2004
  4. Scott
    Replies:
    1
    Views:
    868
    Martin Honnen
    Jul 8, 2004
  5. Replies:
    1
    Views:
    3,611
    A. Bolmarcich
    May 27, 2005
Loading...

Share This Page