XSL substitution

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • StopBsod

    #1

    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.





  • Martin Honnen

    #2
    Re: XSL substitution



    StopBsod wrote:

    [color=blue]
    > 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...[/color]

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

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

    Comment

    • StopBsod

      #3
      Re: XSL substitution

      Le Sat, 17 Jan 2004 19:15:28 +0100, Martin Honnen a écrit :
      [color=blue][color=green]
      >>
      >> My problem : I need to substitute "file:/" with "http://web_site.com"
      >>[/color]
      > XPath has some functions for string processing e.g.
      > concat('http://www.example.com/', substring-after(location, 'file://'))[/color]

      Great, Thanks Martin !

      Worked "out of the box" :

      This domain name has been registered with Gandi.net. It is currently parked by the owner.


      (3 Mb file... ;-)

      M.


      Comment

      Working...