[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with XSL links
- From: Warren Keane <Warren@onlinecmn.com>
- To: "Xml-Dev Mailing List (E-mail)" <xml-dev@lists.xml.org>
- Date: Tue, 19 Jun 2001 17:09:04 -0700
Hello listers,
I need some advice on how to display an XML document in a web site. I have a
single xml document that I get via HTTP. I use ASP functions on a Microsoft
2000 server to parse the data and transform the XML into HTML. The XML
document looks like:
<?xml version="1.0"?>
<News>
<StoryDate>20 June, 2001</StoryDate>
<HeadLines>Equities spill off session... </Headlines>
<FullStory>Equity futures ended Tuesdays session mixed with markets giving
back opening gains as early strength tied to Oracle's earnings Monday proved
only to be a brief reprieve... </FullStory>
I need to produce some HTML which will:
- Display the headlines as a link a web page, when a user selects the link,
the full story which matches the headline is displayed.
- The full story should display in its own window (preferably a java client
side window)
So far I have developed the following XSL
<?xml version="1.0"?>
<HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<BODY>
<p>Headlines for: <xsl:value-of select="News/StoryDate"/></p>
<table border="1">
<tr bgcolor="#9ACDCC">
</tr>
<tr align="center" bgcolor="#FFFFFF">
<xsl:for-each select="News/FullStory">
<tr>
<td width = "*"><p><xsl:value-of
select="Commodity"/></p></td>
<td width = "500"><p><xsl:value-of
select="HeadLines"/></p></td>
</tr>
</xsl:for-each>
</tr>
</table>
</BODY>
</HTML>
As you can see, it doesn;t link the headlines with the full story yet. I
need some direction on how to display the <xsl:value-of select="HeadLines"/>
as an HTML link that when selected will display the full story without going
back and doing a additional HHTP request to get the XML document.
Thanks in advance.