SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Feb 2002
    Location
    Atlanta, GA
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    XSL transformation and hyperlinks

    When I transform my XML, how can I ensure that text which is actually a hyperlink displays in the browser as a hyperlink?

    I've got everything working except this.
    Code:
    <content>yadda yadda yadda..http://www.somesite.com ....yadda yadda </content>


  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    As no one has suggested anything, I thought I'd offer my idea. Could you not set up a kind of word that can be caught and replaced by link? eg

    <content>yadda yadda yadda..XLOhttp://www.somesite.comXLC ....yadda yadda </content>


    then replace XLO (xml-link-open) with "<a href=" and the XLC (xml-link-close) with a ">" when the document is written to the screen.

    Just an idea.........
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if

  3. #3
    SitePoint Addict
    Join Date
    Feb 2002
    Location
    Atlanta, GA
    Posts
    342
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Trying a different approach:

    What about SSI? Including the .xml page within an html page?

    So far I just get plain text, but the links show as hyperlinks.


  4. #4
    SitePoint Guru asterix's Avatar
    Join Date
    Jun 2003
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hows about making a CDATA island:

    <content><![CDATA[
    YOUR TEXT ...
    ]]></content>

    Shouldn't be parsed any more


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •