Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XSLT and displaying hyperlinks in XML XSLT and displaying hyperlinks in XMLTo: 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"/> <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
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
