|
Revision 2
(checked in by douglm, 7 years ago)
|
Initial import of bedework
|
| Line | |
|---|
| 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="text" |
|---|
| 5 |
indent="no" |
|---|
| 6 |
media-type="text/calendar" |
|---|
| 7 |
standalone="yes" |
|---|
| 8 |
/> |
|---|
| 9 |
|
|---|
| 10 |
<xsl:strip-space elements="*"/> |
|---|
| 11 |
<!-- ================= --> |
|---|
| 12 |
<!-- iCAL STYLESHEET --> |
|---|
| 13 |
<!-- ================= --> |
|---|
| 14 |
|
|---|
| 15 |
<!-- MAIN TEMPLATE --> |
|---|
| 16 |
<xsl:template match="/"><xsl:apply-templates select="/ucalendar/event"/></xsl:template> |
|---|
| 17 |
|
|---|
| 18 |
<!--==== SINGLE EVENT ====--> |
|---|
| 19 |
<xsl:template match="event">BEGIN:VCALENDAR |
|---|
| 20 |
BEGIN:VEVENT |
|---|
| 21 |
ORGANIZER:<xsl:value-of select="sponsor/name"/> |
|---|
| 22 |
MAILTO:<xsl:value-of select="sponsor/email"/> |
|---|
| 23 |
DTSTART:<xsl:value-of select="start/fourdigityear"/><xsl:value-of select="start/twodigitmonth"/><xsl:value-of select="start/twodigitday"/>T<xsl:value-of select="start/twodigithour24"/><xsl:value-of select="start/twodigitminute"/>00 |
|---|
| 24 |
DTEND:<xsl:value-of select="end/fourdigityear"/><xsl:value-of select="end/twodigitmonth"/><xsl:value-of select="end/twodigitday"/>T<xsl:choose><xsl:when test="start/time='' and end/time=''">235959</xsl:when><xsl:when test="(end/longdate = start/longdate) and (end/twodigithour24 < start/twodigithour24)"><xsl:value-of select="start/twodigithour24"/><xsl:value-of select="end/twodigitminute"/>00</xsl:when><xsl:otherwise><xsl:value-of select="end/twodigithour24"/><xsl:value-of select="end/twodigitminute"/>00</xsl:otherwise></xsl:choose> |
|---|
| 25 |
LOCATION:<xsl:value-of select="location/address"/> |
|---|
| 26 |
TRANSP:OPAQUE |
|---|
| 27 |
SEQUENCE:0 |
|---|
| 28 |
UID:<xsl:value-of select="startdate"/><xsl:value-of select="starttime"/>_<xsl:value-of select="id"/>@<xsl:value-of select="/ucalendar/urlprefix"/> |
|---|
| 29 |
DESCRIPTION:<xsl:value-of select="normalize-space(description)"/><xsl:if test="cost!=''">\nCost: <xsl:value-of select="cost"/></xsl:if><xsl:if test="sponsor/name!=''">\nSponsor: <xsl:value-of select="sponsor/name"/></xsl:if><xsl:if test="sponsor/phone!=''">\nSponsor phone: <xsl:value-of select="sponsor/phone"/></xsl:if>\n |
|---|
| 30 |
SUMMARY:<xsl:value-of select="summary"/> |
|---|
| 31 |
PRIORITY:5 |
|---|
| 32 |
CLASS:PUBLIC |
|---|
| 33 |
END:VEVENT |
|---|
| 34 |
END:VCALENDAR |
|---|
| 35 |
|
|---|
| 36 |
</xsl:template> |
|---|
| 37 |
</xsl:stylesheet> |
|---|