Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSLT and displaying hyperlinks in XML

From: "Xero" <barisseker@-----.--->
To: NULL
Date: 3/7/2005 4:50:00 PM
Hi,

I apologize in advance if I'm posting this in the wrong newsgroup.

I know the solution to the issue I'm having is very simple but I can't
seem to find it. I have to say I'm a total newbie when it comes to
xml/xslt. Here are my xml and xslt files:

<?xml version="1.0" standalone="yes"?>
<NewDataSet>
    <News>
        <News_ID>1</News_ID>
        <Title_Text>Title 1</Title_Text>
        <Title_URL>http://www.someurl.com</Title_URL>
        <Body>Some text some text some text some text some text some
http://www.msn.com text</Body>
        <RTS_Text>...read the story</RTS_Text>
        <RTS_URL>http://www.someurl.com</RTS_URL>
    </News>
    <News>
        <News_ID>2</News_ID>
        <Title_Text>Title 2</Title_Text>
        <Title_URL>http://www.someurl.com</Title_URL>
        <Body>Some text some text some text http://www.google.com text
some text some text some text</Body>
        <RTS_Text>...read the story</RTS_Text>
        <RTS_URL>http://www.someurl.com</RTS_URL>
    </News>
</NewDataSet>

and xslt

<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template
match="/">
    <table>
    <xsl:for-each select="NewDataSet/News">
    <tr>
      <td>
      <a target="_blank"><xsl:attribute name="href"><xsl:value-of
select="Title_URL"/></xsl:attribute>
      <xsl:value-of select="Title_Text"/></a><BR/>
      <xsl:value-of select="Body"/>&#160;<a
target="_blank"><xsl:attribute name="href"><xsl:value-of
select="RTS_URL"/></xsl:attribute>
      <xsl:value-of select="RTS_Text"/></a>
	<p></p>
      </td>
    </tr>
    </xsl:for-each>
    </table>
</xsl:template></xsl:stylesheet>


Question: How do I make those hyperlinks in the Body show as actual
hyperlinks? If I simply turn it into

<Body>Some text some text some text <a
href="http://www.google.com">http://www.google.com</a> text some text
some text some text</Body>

it won't work. it still shows as text. How do I do this?

I told you I'm a total newbie ;)

TIA

Baris



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent