Forum Moderators: open
<%=CreateHTMLFromXMLXSL("http://www.webmasterworld.com/index.rss", Server.MapPath("webmasterworldheadlines.xsl"), array("date",Left(RFC1123Date(date),16)))%>
Click here [xoc.net] for the function in VBScript.
This is the xsl style sheet:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" omit-xml-declaration="yes" standalone="no"/><xsl:param name="date"/>
<xsl:template match="rss">
<xsl:apply-templates/>
</xsl:template><xsl:template match="child::channel">
<div style="BORDER-RIGHT: gray thin solid;BORDER-TOP: gray thin solid;BORDER-LEFT: gray thin solid;BORDER-BOTTOM: gray thin solid">
<span class="heading">Selected threads from <a href="http://www.webmasterworld.com">WebmasterWorld.Com</a></span><br />
<span class="tiny">For <xsl:value-of select="$date"/></span>
<ul>
<xsl:apply-templates/>
<li><a href="http://www.webmasterworld.com/library.cgi?sortby=Date-Last-Post&sortdir=rvs&ashow=100">More threads...</a></li>
</ul>
</div>
</xsl:template><xsl:template match="child::item">
<li><a href="{child::link}" title="{child::description}"><xsl:value-of select="child::title"/></a></li>
</xsl:template><xsl:template match="child::*"/>
</xsl:stylesheet>
and this is the other function:
Function RFC1123Date(dateSpec)
Dim astrDay
Dim astrNum
Dim astrMonthastrDay = Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat")
astrNum = Array( "00", _
"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", _
"11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _
"21", "22", "23", "24", "25", "26", "27", "28", "29", "30", _
"31", "32", "33", "34", "35", "36", "37", "38", "39", "40", _
"41", "42", "43", "44", "45", "46", "47", "48", "49", "50", _
"51", "52", "53", "54", "55", "56", "57", "58", "59", "60")
astrMonth = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", _
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
RFC1123Date = astrDay(WeekDay(dateSpec) - 1) & ", " & astrNum(Day(dateSpec)) _
& " " & astrMonth(Month(dateSpec) - 1) & " " & Year(dateSpec) _
& " " & astrNum(Hour(dateSpec)) & ":" & astrNum(Minute(dateSpec)) _
& ":" & astrNum(Second(dateSpec)) & " " & Application("TimeZone")
End Function