| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|---|
| 3 |
<xsl:output |
|---|
| 4 |
method="xml" |
|---|
| 5 |
omit-xml-declaration="no" |
|---|
| 6 |
indent="yes" |
|---|
| 7 |
doctype-public="'-//Netscape Communications//DTD RSS 0.91//EN' 'http://my.netscape.com/public/formats/rss-0.91.dtd'" |
|---|
| 8 |
media-type="text/xml" |
|---|
| 9 |
encoding="ISO-8859-1" |
|---|
| 10 |
/> |
|---|
| 11 |
<xsl:template match="/"> |
|---|
| 12 |
<rss version="2.0"> |
|---|
| 13 |
<channel> |
|---|
| 14 |
<title>Bedework Events Calendar</title> |
|---|
| 15 |
<link><xsl:value-of select="/bedework/urlprefix"/></link> |
|---|
| 16 |
<description>My Site's Events</description> |
|---|
| 17 |
<language>en-US</language> |
|---|
| 18 |
<copyright>Copyright <xsl:value-of select="substring(/bedework/currentdate,1,4)"/>, Your Institution Here</copyright> |
|---|
| 19 |
<managingEditor>editor@mysite.edu, Editor Name</managingEditor> |
|---|
| 20 |
<xsl:apply-templates select="/bedework//event"/> |
|---|
| 21 |
</channel> |
|---|
| 22 |
</rss> |
|---|
| 23 |
</xsl:template> |
|---|
| 24 |
<xsl:template match="event"> |
|---|
| 25 |
<item> |
|---|
| 26 |
<title><xsl:value-of select="summary"/> - <xsl:value-of select="substring(start/monthname,1,3)"/><xsl:text> </xsl:text><xsl:value-of select="start/day"/></title> |
|---|
| 27 |
<link><xsl:value-of select="/bedework/urlprefix"/>/eventView.do?subid=<xsl:value-of select="subscription/id"/>&guid=<xsl:value-of select="guid"/>&recurrenceId=<xsl:value-of select="recurrenceId"/></link> |
|---|
| 28 |
<pubDate><xsl:value-of select="substring(start/dayname,1,3)"/>, |
|---|
| 29 |
<xsl:value-of select="start/twodigitday"/><xsl:text> </xsl:text> |
|---|
| 30 |
<xsl:value-of select="substring(start/monthname,1,3)"/><xsl:text> </xsl:text> |
|---|
| 31 |
<xsl:value-of select="start/fourdigityear"/><xsl:text> </xsl:text> |
|---|
| 32 |
<xsl:value-of select="start/twodigithour24"/>:<xsl:value-of select="start/twodigitminute"/>:00 EST</pubDate> |
|---|
| 33 |
<description> |
|---|
| 34 |
<xsl:value-of select="substring(start/dayname,1,3)"/>, |
|---|
| 35 |
<xsl:value-of select="start/longdate"/> |
|---|
| 36 |
<xsl:text> </xsl:text> |
|---|
| 37 |
<xsl:value-of select="start/time"/> |
|---|
| 38 |
<xsl:if test="end/time != ''"> - </xsl:if> |
|---|
| 39 |
<xsl:if test="end/dayname != start/dayname"><xsl:value-of select="substring(end/dayname,1,3)"/>, </xsl:if> |
|---|
| 40 |
<xsl:if test="end/longdate != start/longdate"><xsl:value-of select="end/longdate"/>,</xsl:if> |
|---|
| 41 |
<xsl:if test="end/time != ''"><xsl:value-of select="end/time"/></xsl:if> |
|---|
| 42 |
<xsl:text> </xsl:text> |
|---|
| 43 |
<xsl:value-of select="location/address"/>. |
|---|
| 44 |
<xsl:if test="cost!=''"><xsl:value-of select="cost"/>. </xsl:if> |
|---|
| 45 |
<xsl:value-of select="description"/> |
|---|
| 46 |
</description> |
|---|
| 47 |
</item> |
|---|
| 48 |
</xsl:template> |
|---|
| 49 |
</xsl:stylesheet> |
|---|