Changeset 1370

Show
Ignore:
Timestamp:
04/25/07 08:40:20
Author:
johnsa
Message:

updates to public PDA skinset

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • releases/bedework-3.3.1/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/PDA/default.xsl

    r952 r1370  
    11<?xml version="1.0" encoding="UTF-8"?> 
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    3 <xsl:output 
    4   method="html" 
    5   indent="yes" 
    6   media-type="text/html" 
    7   doctype-public="-//W3C//DTD HTML 3.2 Final//EN" 
    8   standalone="yes" 
    9 /> 
    10   <!-- ============================ --> 
    11   <!-- PDA STYLESHEET               --> 
    12   <!-- designed for Palm Treo 600   --> 
    13   <!-- ============================ --> 
     3<xsl:output method="xhtml" 
     4    indent="yes" 
     5    media-type="text/html" 
     6    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" 
     7    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" 
     8    standalone="yes" 
     9    omit-xml-declaration="yes"/> 
     10 
     11  <!-- ================ --> 
     12  <!--  PDA STYLESHEET --> 
     13  <!-- ================  --> 
     14   <!-- URL of resources common to all bedework apps (javascript, images) --> 
     15  <xsl:variable name="resourceCommons">http://www.rpi.edu/dept/cct/apps/rpi-bedework-3-3/bedework-common</xsl:variable> 
     16 
     17  <!-- DEFINE INCLUDES --> 
     18  <!-- cannot use the resourceCommons variable in xsl:include paths --> 
     19  <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
     20  <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
    1421 
    1522  <!-- DEFINE GLOBAL CONSTANTS --> 
    16   <!-- URL of html resources (images, css, other html); by default this is 
    17        set to the application root --> 
    18   <xsl:variable name="resourcesRoot" select="/ucalendar/approot"/> 
    1923 
    2024  <!-- URL of the XSL template directory --> 
     
    2529       reference it explicitly.  It is not used in this stylesheet, however, 
    2630       and can be safely removed if you so choose. --> 
    27   <xsl:variable name="appRoot" select="/ucalendar/approot"/> 
     31  <xsl:variable name="appRoot" select="/bedework/approot"/> 
     32 
     33  <!-- URL of html resources (images, css, other html); by default this is 
     34       set to the application root --> 
     35  <xsl:variable name="resourcesRoot" select="/bedework/approot"/> 
     36 
     37  <!-- Properly encoded prefixes to the application actions; use these to build 
     38       urls; allows the application to be used without cookies or within a portal. 
     39       These urls are rewritten in header.jsp and simply passed through for use 
     40       here. Every url includes a query string (either ?b=de or a real query 
     41       string) so that all links constructed in this stylesheet may begin the 
     42       query string with an ampersand. --> 
     43  <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> 
     44  <xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/> 
     45  <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/> 
     46  <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/> 
     47  <xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/> 
     48  <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/> 
     49  <xsl:variable name="export" select="/bedework/urlPrefixes/misc/export/a/@href"/> 
     50  <xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/> 
     51  <xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/> 
     52  <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> 
     53  <xsl:variable name="showPage" select="/bedework/urlPrefixes/main/showPage"/> 
     54  <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> 
    2855 
    2956  <!-- URL of the web application - includes web context --> 
    30   <xsl:variable name="urlPrefix" select="/ucalendar/urlprefix"/> 
    31  
    32   <xsl:variable name="prevdate" select="/ucalendar/previousdate"/> 
    33   <xsl:variable name="nextdate" select="/ucalendar/nextdate"/> 
    34   <xsl:variable name="curdate" select="/ucalendar/currentdate"/> 
     57  <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> 
     58 
     59  <!-- Other generally useful global variables --> 
     60  <xsl:variable name="privateCal">/ucal</xsl:variable> 
     61  <xsl:variable name="prevdate" select="/bedework/previousdate"/> 
     62  <xsl:variable name="nextdate" select="/bedework/nextdate"/> 
     63  <xsl:variable name="curdate" select="/bedework/currentdate/date"/> 
     64 
    3565 
    3666  <!-- MAIN TEMPLATE --> 
     
    3868    <html lang="en"> 
    3969      <head> 
    40         <title>Calendar of Events</title> 
     70        <title>RPI Calendar of Events</title> 
     71        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 
     72        <link rel="stylesheet" href="{$resourcesRoot}/default/PDA/pda.css"/> 
    4173      </head> 
    4274      <body> 
    43         <xsl:call-template name="headBar"/> 
    44         <!-- <xsl:call-template name="alerts"/> --> 
     75        <div id="titleBar"> 
     76          Rensselaer Events Calendar 
     77            <span id="homeLink"> 
     78              [<a href="http://www.rpi.edu/pda/index.html">rpi-pda</a>] 
     79            </span> 
     80        </div> 
     81        <xsl:call-template name="infoAndNavigation"/> 
    4582        <xsl:choose> 
    46           <xsl:when test="/ucalendar/page='event'"> 
     83          <xsl:when test="/bedework/page='event'"> 
    4784            <!-- show an event --> 
    48             <xsl:apply-templates select="/ucalendar/event"/> 
     85            <xsl:apply-templates select="/bedework/event"/> 
    4986          </xsl:when> 
    50           <xsl:when test="/ucalendar/page='calendars'"> 
     87          <xsl:when test="/bedework/page='calendarList'"> 
    5188            <!-- show a list of all calendars --> 
    52             <xsl:apply-templates select="/ucalendar/calendars"/> 
     89            <xsl:apply-templates select="/bedework/calendars"/> 
    5390          </xsl:when> 
    5491          <xsl:otherwise> 
     
    5895          </xsl:otherwise> 
    5996        </xsl:choose> 
    60         <!-- <xsl:if test="/ucalendar/periodname!='Year' and /ucalendar/periodname!='Day'"> 
    61           <p align="center"> 
    62             <xsl:call-template name="searchBar"/> 
    63             <xsl:call-template name="navigation"/> 
    64           </p> 
    65         </xsl:if>--> 
    6697        <!-- footer --> 
    67         <xsl:call-template name="footer"/> 
     98        <p id="footer"> 
     99          <br/><br/><!-- why, you ask? ...blackberry --> 
     100          <a href="{$setup}&amp;browserTypeSticky=PDA">Events Calendar</a> | 
     101          <a href="http://www.rpi.edu/pda">Portable Rensselaer</a><br/> 
     102          <small>Maintained by C&amp;MT, DotCIO, Rensselaer Polytechnic Institute</small> 
     103        </p> 
    68104      </body> 
    69105    </html> 
    70106  </xsl:template> 
    71107 
     108  <!-- === Date Info and Navigation == --> 
     109  <xsl:template name="infoAndNavigation"> 
     110    <div id="dateInfo"> 
     111      <xsl:if test="/bedework/page!='calendars' and /bedework/page!='event'"> 
     112        &lt;<a href="{$setViewPeriod}&amp;date={$prevdate}">prev</a> 
     113        <xsl:text> </xsl:text> 
     114        <strong> 
     115          <xsl:choose> 
     116            <xsl:when test="/bedework/periodname='Day'"> 
     117              <xsl:value-of select="substring(/bedework/eventscalendar/year/month/week/day/name,1,3)"/>, <xsl:value-of select="/bedework/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/bedework/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
     118            </xsl:when> 
     119            <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
     120              Week of <xsl:value-of select="/bedework/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/bedework/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
     121            </xsl:when> 
     122            <xsl:when test="/bedework/periodname='Month'"> 
     123              <xsl:value-of select="/bedework/eventscalendar/year/month/longname"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
     124            </xsl:when> 
     125            <xsl:otherwise> 
     126              <xsl:value-of select="/bedework/eventscalendar/year/value"/> 
     127            </xsl:otherwise> 
     128          </xsl:choose> 
     129        </strong> 
     130        <xsl:text> </xsl:text> 
     131        <a href="{$setViewPeriod}&amp;date={$nextdate}">next</a>&gt; 
     132        <br /> 
     133      </xsl:if> 
     134    </div> 
     135    <div id="mainNav"> 
     136      <xsl:choose> 
     137        <xsl:when test="/bedework/page='eventscalendar'"> 
     138          <xsl:choose> 
     139            <xsl:when test="/bedework/periodname='Day'"> 
     140              day 
     141            </xsl:when> 
     142            <xsl:otherwise> 
     143              <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}">day</a> 
     144            </xsl:otherwise> 
     145          </xsl:choose> | 
     146          <xsl:choose> 
     147            <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
     148              week 
     149             </xsl:when> 
     150            <xsl:otherwise> 
     151              <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}">week</a> 
     152             </xsl:otherwise> 
     153          </xsl:choose> | 
     154          <xsl:choose> 
     155            <xsl:when test="/bedework/periodname='Month'"> 
     156              month 
     157            </xsl:when> 
     158            <xsl:otherwise> 
     159              <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}">month</a> 
     160            </xsl:otherwise> 
     161          </xsl:choose> | 
     162        </xsl:when> 
     163        <xsl:otherwise> 
     164          <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}">day</a> | 
     165          <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}">week</a> | 
     166          <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}">month</a> | 
     167        </xsl:otherwise> 
     168      </xsl:choose> 
     169      <a href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}"> 
     170        today 
     171      </a><br /> 
     172      <xsl:choose> 
     173        <xsl:when test="/bedework/selectionState/selectionType = 'calendar'"> 
     174          Calendar: <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> 
     175          <span class="link">[<a href="{$setSelection}">default view</a>]</span> 
     176        </xsl:when> 
     177        <xsl:when test="/bedework/selectionState/selectionType = 'search'"> 
     178          Current search: <xsl:value-of select="/bedework/search"/> 
     179          <span class="link">[<a href="{$setSelection}">default view</a>]</span> 
     180        </xsl:when> 
     181        <xsl:when test="/bedework/selectionState/selectionType = 'subscription'"> 
     182          Subscription: (not implemented yet) 
     183          <span class="link">[<a href="{$setSelection}">default view</a>]</span> 
     184        </xsl:when> 
     185        <xsl:when test="/bedework/selectionState/selectionType = 'filter'"> 
     186          Filter: (not implemented yet) 
     187          <span class="link">[<a href="{$setSelection}">default view</a>]</span> 
     188        </xsl:when> 
     189        <xsl:otherwise><!-- view --> 
     190          <!--<form name="selectViewForm" method="post" action="{$setSelection}"> 
     191            View: 
     192            <select name="viewName" onChange="submit()" > 
     193              <xsl:for-each select="/bedework/views/view"> 
     194                <xsl:variable name="name" select="name"/> 
     195                <xsl:choose> 
     196                  <xsl:when test="name=/bedework/selectionState/view/name"> 
     197                    <option value="{$name}" selected="selected"><xsl:value-of select="name"/></option> 
     198                  </xsl:when> 
     199                  <xsl:otherwise> 
     200                    <option value="{$name}"><xsl:value-of select="name"/></option> 
     201                  </xsl:otherwise> 
     202                </xsl:choose> 
     203              </xsl:for-each> 
     204            </select> 
     205          </form>--> 
     206          <span class="calLinks"><a href="{$fetchPublicCalendars}">available calendars</a></span> 
     207        </xsl:otherwise> 
     208      </xsl:choose> 
     209    </div><br/><br/> 
     210  </xsl:template> 
     211 
    72212  <!--==== SINGLE EVENT ====--> 
    73213  <xsl:template match="event"> 
     214    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     215    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     216    <xsl:variable name="guid" select="guid"/> 
     217    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     218    <xsl:variable name="statusClass"> 
     219      <xsl:choose> 
     220        <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
     221        <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
     222        <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
     223      </xsl:choose> 
     224    </xsl:variable> 
     225    <h2 class="{$statusClass}"> 
     226      <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
     227      <xsl:choose> 
     228        <xsl:when test="link != ''"> 
     229          <xsl:variable name="link" select="link"/> 
     230          <a href="{$link}"> 
     231            <xsl:value-of select="summary"/> 
     232          </a> 
     233        </xsl:when> 
     234        <xsl:otherwise> 
     235          <xsl:value-of select="summary"/> 
     236        </xsl:otherwise> 
     237      </xsl:choose> 
     238    </h2> 
    74239    <table id="eventTable" cellpadding="0" cellspacing="0"> 
    75240      <tr> 
    76         <th align="left" valign="top">Event:</th> 
    77         <th align="left" valign="top"> 
     241        <td class="fieldname">When:</td> 
     242        <td class="fieldval"> 
     243          <!-- always display local time --> 
     244          <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
     245          <xsl:if test="start/allday = 'false'"> 
     246            <span class="time"><xsl:value-of select="start/time"/></span> 
     247          </xsl:if> 
     248          <xsl:if test="(end/longdate != start/longdate) or 
     249                        ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
     250          <xsl:if test="end/longdate != start/longdate"> 
     251            <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
     252          </xsl:if> 
    78253          <xsl:choose> 
    79             <xsl:when test="link != ''"> 
    80               <xsl:variable name="link" select="link"/
    81               <a href="{$link}"
    82                 <xsl:value-of select="summary"/
    83               </a
    84             </xsl:when> 
    85             <xsl:otherwise
    86               <xsl:value-of select="summary"/
    87             </xsl:otherwise
     254            <xsl:when test="start/allday = 'true'"> 
     255              <span class="time"><em>(all day)</em></span
     256            </xsl:when
     257            <xsl:when test="end/longdate != start/longdate"
     258              <span class="time"><xsl:value-of select="end/time"/></span
     259            </xsl:when> 
     260            <xsl:when test="end/time != start/time"
     261              <span class="time"><xsl:value-of select="end/time"/></span
     262            </xsl:when
    88263          </xsl:choose> 
     264          <!-- if timezones are not local, or if floating add labels: --> 
     265          <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> 
     266            <xsl:text> </xsl:text> 
     267            -- 
     268            <strong> 
     269              <xsl:choose> 
     270                <xsl:when test="start/floating = 'true'"> 
     271                  Floating time 
     272                </xsl:when> 
     273                <xsl:otherwise> 
     274                  Local time 
     275                </xsl:otherwise> 
     276              </xsl:choose> 
     277            </strong> 
     278            <br/> 
     279          </xsl:if> 
     280          <!-- display in timezone if not local or floating time) --> 
     281          <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> 
     282            <xsl:choose> 
     283              <xsl:when test="start/timezone/id != end/timezone/id"> 
     284                <!-- need to display both timezones if they differ from start to end --> 
     285                <table border="0" cellspacing="0" id="tztable"> 
     286                  <tr> 
     287                    <td> 
     288                      <strong>Start:</strong> 
     289                    </td> 
     290                    <td> 
     291                      <xsl:choose> 
     292                        <xsl:when test="start/timezone/islocal='true'"> 
     293                          <xsl:value-of select="start/dayname"/>, 
     294                          <xsl:value-of select="start/longdate"/> 
     295                          <xsl:text> </xsl:text> 
     296                          <span class="time"><xsl:value-of select="start/time"/></span> 
     297                        </xsl:when> 
     298                        <xsl:otherwise> 
     299                          <xsl:value-of select="start/timezone/dayname"/>, 
     300                          <xsl:value-of select="start/timezone/longdate"/> 
     301                          <xsl:text> </xsl:text> 
     302                          <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
     303                        </xsl:otherwise> 
     304                      </xsl:choose> 
     305                    </td> 
     306                    <td> 
     307                      -- 
     308                      <strong><xsl:value-of select="start/timezone/id"/></strong> 
     309                    </td> 
     310                  </tr> 
     311                  <tr> 
     312                    <td> 
     313                      <strong>End:</strong> 
     314                    </td> 
     315                    <td> 
     316                      <xsl:choose> 
     317                        <xsl:when test="end/timezone/islocal='true'"> 
     318                          <xsl:value-of select="end/dayname"/>, 
     319                          <xsl:value-of select="end/longdate"/> 
     320                          <xsl:text> </xsl:text> 
     321                          <span class="time"><xsl:value-of select="end/time"/></span> 
     322                        </xsl:when> 
     323                        <xsl:otherwise> 
     324                          <xsl:value-of select="end/timezone/dayname"/>, 
     325                          <xsl:value-of select="end/timezone/longdate"/> 
     326                          <xsl:text> </xsl:text> 
     327                          <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
     328                        </xsl:otherwise> 
     329                      </xsl:choose> 
     330                    </td> 
     331                    <td> 
     332                      -- 
     333                      <strong><xsl:value-of select="end/timezone/id"/></strong> 
     334                    </td> 
     335                  </tr> 
     336                </table> 
     337              </xsl:when> 
     338              <xsl:otherwise> 
     339                <!-- otherwise, timezones are the same: display as a single line  --> 
     340                <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> 
     341                <xsl:if test="start/allday = 'false'"> 
     342                  <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
     343                </xsl:if> 
     344                <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or 
     345                              ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> 
     346                <xsl:if test="end/timezone/longdate != start/timezone/longdate"> 
     347                  <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> 
     348                </xsl:if> 
     349                <xsl:choose> 
     350                  <xsl:when test="start/allday = 'true'"> 
     351                    <span class="time"><em>(all day)</em></span> 
     352                  </xsl:when> 
     353                  <xsl:when test="end/timezone/longdate != start/timezone/longdate"> 
     354                    <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
     355                  </xsl:when> 
     356                  <xsl:when test="end/timezone/time != start/timezone/time"> 
     357                    <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
     358                  </xsl:when> 
     359                </xsl:choose> 
     360                <xsl:text> </xsl:text> 
     361                -- 
     362                <strong><xsl:value-of select="start/timezone/id"/></strong> 
     363              </xsl:otherwise> 
     364            </xsl:choose> 
     365          </xsl:if> 
     366        </td> 
     367        <th class="icalIcon" rowspan="2"> 
     368          <div id="eventIcons"> 
     369            <!--<a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> 
     370              <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> 
     371            add to my calendar</a>--> 
     372            <!--<xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     373            <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     374              <img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> 
     375             download</a>--> 
     376          </div> 
    89377        </th> 
    90378      </tr> 
    91379      <tr> 
    92         <td valign="top">When:</td> 
    93         <td valign="top"> 
    94           <!-- was using abbrev dayname: substring(start/dayname,1,3) --> 
    95           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    96           <span class="time"><xsl:value-of select="start/time"/></span> 
    97           <xsl:if test="end/time != '' or end/longdate != start/longdate"> - </xsl:if> 
    98           <xsl:if test="end/longdate != start/longdate"><xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text></xsl:if> 
    99           <xsl:if test="end/time != ''"><span class="time"><xsl:value-of select="end/time"/></span></xsl:if> 
    100         </td> 
    101       </tr> 
    102       <tr> 
    103         <td valign="top">Where:</td> 
    104         <td valign="top"> 
     380        <td class="fieldname">Where:</td> 
     381        <td class="fieldval"> 
    105382          <xsl:choose> 
    106383            <xsl:when test="location/link=''"> 
     
    120397      </tr> 
    121398      <tr> 
    122         <td valign="top">Desc:</td> 
    123         <td valign="top"> 
    124           <xsl:value-of select="description"/> 
     399        <td class="fieldname">Description:</td> 
     400        <td colspan="2" class="fieldval description"> 
     401          <xsl:call-template name="replace"> 
     402            <xsl:with-param name="string" select="description"/> 
     403            <xsl:with-param name="pattern" select="'&#xA;'"/> 
     404            <xsl:with-param name="replacement"><br/></xsl:with-param> 
     405          </xsl:call-template> 
    125406        </td> 
    126407      </tr> 
    127       <xsl:if test="cost!=''"> 
     408      <xsl:if test="status !='' and status != 'CONFIRMED'"> 
    128409        <tr> 
    129           <td valign="top">Cost:</td> 
    130           <td colspan="2" valign="top"><xsl:value-of select="cost"/></td> 
     410          <td class="fieldname">Status:</td> 
     411          <td class="fieldval"> 
     412            <xsl:value-of select="status"/> 
     413          </td> 
     414        </tr> 
     415      </xsl:if> 
     416      <xsl:if test="cost!=''"> 
     417        <tr> 
     418          <td class="fieldname">Cost:</td> 
     419          <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> 
    131420        </tr> 
    132421      </xsl:if> 
    133422      <xsl:if test="link != ''"> 
    134423        <tr> 
    135           <td valign="top">See:</td> 
    136           <td valign="top"> 
     424          <td class="fieldname">See:</td> 
     425          <td colspan="2" class="fieldval"> 
    137426            <xsl:variable name="link" select="link"/> 
    138427            <a href="{$link}"><xsl:value-of select="link"/></a> 
     
    140429        </tr> 
    141430      </xsl:if> 
    142       <xsl:if test="sponsor/name!='none'"> 
     431      <xsl:if test="contact/name!='none'"> 
    143432        <tr> 
    144           <td valign="top">Contact:</td> 
    145           <td valign="top"> 
     433          <td class="fieldname">Contact:</td> 
     434          <td colspan="2" class="fieldval"> 
    146435            <xsl:choose> 
    147               <xsl:when test="sponsor/link=''"> 
    148                 <xsl:value-of select="sponsor/name"/> 
     436              <xsl:when test="contact/link=''"> 
     437                <xsl:value-of select="contact/name"/> 
    149438              </xsl:when> 
    150439              <xsl:otherwise> 
    151                 <xsl:variable name="sponsorLink" select="sponsor/link"/> 
     440                <xsl:variable name="sponsorLink" select="contact/link"/> 
    152441                <a href="{$sponsorLink}"> 
    153                   <xsl:value-of select="sponsor/name"/> 
     442                  <xsl:value-of select="contact/name"/> 
    154443                </a> 
    155444              </xsl:otherwise> 
    156445            </xsl:choose> 
    157             <xsl:if test="sponsor/phone!=''"> 
    158               <br /><xsl:value-of select="sponsor/phone"/> 
     446            <xsl:if test="contact/phone!=''"> 
     447              <br /><xsl:value-of select="contact/phone"/> 
    159448            </xsl:if> 
     449            <!-- If you want to display email addresses, uncomment the 
     450                 following 8 lines. --> 
     451            <!-- <xsl:if test="contact/email!=''"> 
     452              <br /> 
     453              <xsl:variable name="email" select="contact/email"/> 
     454              <xsl:variable name="subject" select="summary"/> 
     455              <a href="mailto:{$email}&amp;subject={$subject}"> 
     456                <xsl:value-of select="contact/email"/> 
     457              </a> 
     458            </xsl:if> --> 
    160459          </td> 
    161460        </tr> 
    162461      </xsl:if> 
     462      <xsl:if test="calendar/path!=''"> 
     463        <tr> 
     464          <td class="fieldname">Calendar:</td> 
     465          <td class="fieldval"> 
     466            <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
     467            <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
     468              <xsl:value-of select="calendar/name"/> 
     469            </a> 
     470          </td> 
     471        </tr> 
     472      </xsl:if> 
     473      <xsl:if test="categories/category"> 
     474        <tr> 
     475          <td class="fieldname">Categories:</td> 
     476          <td class="fieldval"> 
     477            <xsl:for-each select="categories/category"> 
     478              <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> 
     479            </xsl:for-each> 
     480          </td> 
     481        </tr> 
     482      </xsl:if> 
    163483    </table> 
    164     <p align="center"> 
    165       <xsl:variable name="id" select="id"/> 
    166       <xsl:variable name="vcalName" select="concat($id,'.vcs')"/> 
    167       <b> 
    168         <a href="{$urlPrefix}/eventView.do?eventId={$id}&amp;nocache=no&amp;skinName=vcal&amp;contentType=text/calendar&amp;contentName={$vcalName}" title="Download event as vCal"> 
    169           Download this Event 
    170         </a> 
    171       </b> 
    172     </p> 
    173484  </xsl:template> 
    174485 
     
    176487  <xsl:template name="listView"> 
    177488    <xsl:choose> 
    178       <xsl:when test="count(/ucalendar/eventscalendar/year/month/week/day/event)=0"> 
    179         There are no events posted 
    180         <xsl:choose> 
    181           <xsl:when test="/ucalendar/periodname='Day'"> 
    182             today<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>. 
    183           </xsl:when> 
    184           <xsl:when test="/ucalendar/periodname='Month'"> 
    185             this month<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>. 
    186           </xsl:when> 
    187           <xsl:otherwise> 
    188             this week<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>. 
    189           </xsl:otherwise> 
    190         </xsl:choose> 
     489      <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
     490        <p>No events to display.</p> 
    191491      </xsl:when> 
    192492      <xsl:otherwise> 
    193         <xsl:for-each select="/ucalendar/eventscalendar/year/month/week/day[count(event)!=0]"> 
    194           <xsl:if test="/ucalendar/periodname='Week' or /ucalendar/periodname='Month' or /ucalendar/periodname=''"> 
     493        <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[count(event)!=0]"> 
     494          <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
     495            <br/><br/><!-- why? css isn't stong on blackberry --> 
    195496            <h3> 
    196497              <xsl:variable name="date" select="date"/> 
    197               <a href="{$urlPrefix}/setView.do?viewType=dayView&amp;date={$date}"> 
     498              <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
    198499                <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    199500              </a> 
     
    202503          <xsl:for-each select="event"> 
    203504            <xsl:variable name="id" select="id"/> 
     505            <xsl:variable name="subscriptionId" select="subscription/id"/> 
     506            <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     507            <xsl:variable name="guid" select="guid"/> 
     508            <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    204509            <dl> 
    205510              <dt> 
    206511                <xsl:choose> 
    207                   <xsl:when test="start/time!=''"> 
    208                     <a href="{$urlPrefix}/eventView.do?eventId={$id}"> 
     512                  <xsl:when test="start/allday = 'true' and 
     513                                  start/shortdate = end/shortdate"> 
     514                    all day 
     515                  </xsl:when> 
     516                  <xsl:when test="start/shortdate = end/shortdate and 
     517                                  start/time = end/time"> 
     518                    <xsl:value-of select="start/time"/> 
     519                  </xsl:when> 
     520                  <xsl:otherwise> 
    209521                    <xsl:choose> 
     522                      <xsl:when test="start/allday = 'true' and 
     523                                      parent::day/shortdate = start/shortdate"> 
     524                        today 
     525                      </xsl:when> 
    210526                      <xsl:when test="parent::day/shortdate != start/shortdate"> 
    211527                        <span class="littleArrow">&#171;</span>&#160; 
     
    216532                      </xsl:otherwise> 
    217533                    </xsl:choose> 
    218                     </a> 
    219                   </xsl:when> 
    220                   <xsl:otherwise> 
    221                     <a href="{$urlPrefix}/eventView.do?eventId={$id}"> 
    222                       All day 
    223                     </a> 
    224                   </xsl:otherwise> 
    225                 </xsl:choose> 
    226                 <xsl:choose> 
    227                   <xsl:when test="end/time!=''"> 
    228                     <a href="{$urlPrefix}/eventView.do?eventId={$id}">-</a> 
    229                   </xsl:when> 
    230                   <xsl:otherwise> 
    231                     &#160; 
    232                   </xsl:otherwise> 
    233                 </xsl:choose> 
    234                 <xsl:choose> 
    235                   <xsl:when  test="end/time!=''"> 
    236                     <a href="{$urlPrefix}/eventView.do?eventId={$id}"> 
     534                    - 
    237535                    <xsl:choose> 
     536                      <xsl:when test="end/allday = 'true' and 
     537                                      parent::day/shortdate = end/shortdate"> 
     538                        today 
     539                      </xsl:when> 
    238540                      <xsl:when test="parent::day/shortdate != end/shortdate"> 
    239541                        <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
     
    244546                      </xsl:otherwise> 
    245547                    </xsl:choose> 
    246                     </a> 
    247                   </xsl:when> 
    248                   <xsl:otherwise> 
    249                     &#160; 
    250548                  </xsl:otherwise> 
    251549                </xsl:choose> 
    252550              </dt> 
    253551              <dd> 
     552                <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
    254553                <xsl:choose> 
    255                   <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'"> 
    256                     <a href="{$urlPrefix}/eventView.do?eventId={$id}"> 
    257                       <strong><xsl:value-of select="summary"/>: </strong> 
     554                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
     555                    <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     556                      <strong> 
     557                        <xsl:value-of select="summary"/>: 
     558                      </strong> 
    258559                      <xsl:value-of select="description"/>&#160; 
    259560                      <em> 
     
    265566                          <xsl:value-of select="cost"/>.&#160; 
    266567                        </xsl:if> 
    267                         <xsl:if test="sponsor/name!='none'"> 
    268                           Contact: <xsl:value-of select="sponsor/name"/> 
     568                        <xsl:if test="contact/name!='none'"> 
     569                          Contact: <xsl:value-of select="contact/name"/> 
    269570                        </xsl:if> 
    270571                      </em> 
     572                      - <xsl:value-of select="calendar/name"/> 
    271573                    </a> 
    272574                    <xsl:if test="link != ''"> 
     
    276578                  </xsl:when> 
    277579                  <xsl:otherwise> 
    278                     <a href="{$urlPrefix}/eventView.do?eventId={$id}"> 
    279                       <xsl:value-of select="summary"/>, <xsl:value-of select="location/address"/> 
     580                    <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     581                      <xsl:value-of select="summary"/> 
     582                      <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    280583                    </a> 
     584                    - <em><xsl:value-of select="calendar/name"/></em> 
    281585                  </xsl:otherwise> 
    282586                </xsl:choose> 
     
    291595  <!--==== CALENDARS PAGE ====--> 
    292596  <xsl:template match="calendars"> 
    293     <xsl:variable name="topLevelCalCount" select="count(/ucalendar/calendars/calendar)"/> 
    294597    <p><b>All Calendars</b><br /> 
    295598    Select a calendar from the list below to see only that calendar's events.</p> 
    296     <xsl:apply-templates select="calendar"/> 
     599    <xsl:apply-templates select="calendar/calendar" mode="calTree"/> 
    297600  </xsl:template> 
    298601 
    299   <xsl:template match="calendar"> 
    300     <xsl:variable name="id" select="id"/> 
    301     <h2><a href="{$urlPrefix}/selectCalendar.do?calId={$id}"><xsl:value-of select="title"/></a></h2> 
    302     <ul> 
    303       <xsl:for-each select="calendar"> 
    304         <xsl:sort select="title" order="ascending" case-order="upper-first"/> 
    305         <xsl:variable name="id" select="id"/> 
    306         <li><a href="{$urlPrefix}/selectCalendar.do?calId={$id}"><xsl:value-of select="title"/></a></li> 
    307       </xsl:for-each> 
    308     </ul> 
     602  <xsl:template match="calendar" mode="calTree"> 
     603    <xsl:variable name="itemClass"> 
     604      <xsl:choose> 
     605        <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     606        <xsl:otherwise>calendar</xsl:otherwise> 
     607      </xsl:choose> 
     608    </xsl:variable> 
     609    <xsl:variable name="url" select="encodedPath"/> 
     610    <li class="{$itemClass}"> 
     611      <a href="{$setSelection}&amp;calUrl={$url}" title="view calendar"><xsl:value-of select="name"/></a> 
     612      <xsl:if test="calendarCollection='true'"> 
     613        <xsl:variable name="name" select="name"/> 
     614        <xsl:variable name="calPath" select="path"/> 
     615        <span class="exportCalLink"> 
     616          <a href="javascript:launchExportWidget('exportCalendarForm','{$name}','{$calPath}')" id="{$calPath}" title="export calendar as iCal"> 
     617            <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 
     618          </a> 
     619        </span> 
     620      </xsl:if> 
     621      <xsl:if test="calendar"> 
     622        <ul> 
     623          <xsl:apply-templates select="calendar" mode="calTree"/> 
     624        </ul> 
     625      </xsl:if> 
     626    </li> 
    309627  </xsl:template> 
    310628 
    311   <!--==== BLOCK (named) TEMPLATES and NAVIGATION  ====--> 
    312   <!-- these templates are separated out for convenience and to simplify the default template --> 
    313  
    314   <xsl:template name="headBar"> 
    315     <p align="center"> 
    316       <b>Rensselaer Events Calendar</b><br /> 
    317       <xsl:if test="/ucalendar/page!='calendars' and /ucalendar/page!='event'"> 
    318         <a href="{$urlPrefix}/setView.do?date={$prevdate}"><img src="{$resourcesRoot}/images/rensselaer/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
    319         <xsl:text> </xsl:text> 
    320         <xsl:choose> 
    321           <xsl:when test="/ucalendar/periodname='Day'"> 
    322             <xsl:value-of select="substring(/ucalendar/eventscalendar/year/month/week/day/name,1,3)"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/ucalendar/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> 
    323           </xsl:when> 
    324           <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''"> 
    325             Week of <xsl:value-of select="/ucalendar/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/ucalendar/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> 
    326           </xsl:when> 
    327           <xsl:when test="/ucalendar/periodname='Month'"> 
    328             <xsl:value-of select="/ucalendar/eventscalendar/year/month/longname"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> 
    329           </xsl:when> 
    330           <xsl:otherwise> 
    331             <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> 
    332           </xsl:otherwise> 
    333         </xsl:choose> 
    334         <xsl:text> </xsl:text> 
    335         <a href="{$urlPrefix}/setView.do?date={$nextdate}"><img src="{$resourcesRoot}/images/rensselaer/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a><br /> 
    336       </xsl:if> 
    337       <xsl:choose> 
    338         <xsl:when test="/ucalendar/page='eventscalendar'"> 
    339           <xsl:choose> 
    340             <xsl:when test="/ucalendar/periodname='Day'"> 
    341               day 
    342             </xsl:when> 
    343             <xsl:otherwise> 
    344               <a href="{$urlPrefix}/setView.do?viewType=dayView&amp;date={$curdate}">day</a> 
    345             </xsl:otherwise> 
    346           </xsl:choose> | 
    347           <xsl:choose> 
    348             <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''"> 
    349               week 
    350              </xsl:when> 
    351             <xsl:otherwise> 
    352               <a href="{$urlPrefix}/setView.do?viewType=weekView&amp;date={$curdate}">week</a> 
    353              </xsl:otherwise> 
    354           </xsl:choose> | 
    355           <xsl:choose> 
    356             <xsl:when test="/ucalendar/periodname='Month'"> 
    357               month 
    358             </xsl:when> 
    359             <xsl:otherwise> 
    360               <a href="{$urlPrefix}/setView.do?viewType=monthView&amp;date={$curdate}">month</a> 
    361             </xsl:otherwise> 
    362           </xsl:choose> | 
    363         </xsl:when> 
    364         <xsl:otherwise> 
    365           <a href="{$urlPrefix}/setView.do?viewType=dayView&amp;date={$curdate}">day</a> | 
    366           <a href="{$urlPrefix}/setView.do?viewType=weekView&amp;date={$curdate}">week</a> | 
    367           <a href="{$urlPrefix}/setView.do?viewType=monthView&amp;date={$curdate}">month</a> | 
    368         </xsl:otherwise> 
    369       </xsl:choose> 
    370       <a href="{$urlPrefix}/setView.do?viewType=todayView&amp;date={$curdate}"> 
    371         today 
    372       </a><br /> 
    373       <xsl:choose> 
    374          <xsl:when test="/ucalendar/title!=''"> 
    375            Calendar: <xsl:value-of select="/ucalendar/title"/><xsl:text> </xsl:text> 
    376            [<a href="{$urlPrefix}/selectCalendar.do?calId=">clear</a>] 
    377          </xsl:when> 
    378          <xsl:when test="/ucalendar/search!=''"> 
    379            Current search: <xsl:value-of select="/ucalendar/search"/><xsl:text> </xsl:text> 
    380            [<a href="{$urlPrefix}/selectCalendar.do?calId=">clear</a>] 
    381          </xsl:when> 
    382          <xsl:otherwise> 
    383            Current calendar: All [<a href="{$urlPrefix}/showCals.do">select</a>] 
    384          </xsl:otherwise> 
    385       </xsl:choose> 
    386     </p> 
    387   </xsl:template> 
    388  
    389   <xsl:template name="alerts"> 
    390     <table id="alertsTable"> 
    391       <tr> 
    392         <td> 
    393           I'm an alert 
    394         </td> 
    395       </tr> 
    396     </table> 
    397   </xsl:template> 
    398  
    399   <!-- <xsl:template name="searchBar"> 
    400     <form name="calForm" method="post" action="{$urlPrefix}/selectCalendar.do">Search: <input type="text" name="searchString" size="30" value=""/><input type="submit" value="go"/></form> 
    401   </xsl:template> --> 
     629 
     630 
     631  <!--==== NAVIGATION  ====--> 
    402632 
    403633  <xsl:template name="dateSelect"> 
    404     <form name="calForm" method="post" action="{$urlPrefix}/setView.do"> 
     634    <form name="calForm" method="get" action="{$urlPrefix}/setView.do"> 
    405635      <table border="0" cellpadding="0" cellspacing="0"> 
    406636        <tr> 
    407           <xsl:if test="/ucalendar/periodname!='Year'"> 
     637          <xsl:if test="/bedework/periodname!='Year'"> 
    408638            <td> 
    409639              <select name="viewStartDate.month"> 
    410                 <xsl:for-each select="/ucalendar/monthvalues/val"> 
     640                <xsl:for-each select="/bedework/monthvalues/val"> 
    411641                  <xsl:variable name="temp" select="."/> 
    412642                  <xsl:variable name="pos" select="position()"/> 
    413643                  <xsl:choose> 
    414                     <xsl:when test="/ucalendar/monthvalues[start=$temp]"> 
     644                    <xsl:when test="/bedework/monthvalues[start=$temp]"> 
    415645                      <option value="{$temp}" selected="selected"> 
    416                         <xsl:value-of select="/ucalendar/monthlabels/val[position()=$pos]"/> 
     646                        <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    417647                      </option> 
    418648                    </xsl:when> 
    419649                    <xsl:otherwise> 
    420650                      <option value="{$temp}"> 
    421                         <xsl:value-of select="/ucalendar/monthlabels/val[position()=$pos]"/> 
     651                        <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    422652                      </option> 
    423653                    </xsl:otherwise> 
     
    426656              </select> 
    427657            </td> 
    428             <xsl:if test="/ucalendar/periodname!='Month'"> 
     658            <xsl:if test="/bedework/periodname!='Month'"> 
    429659              <td> 
    430660                <select name="viewStartDate.day"> 
    431                   <xsl:for-each select="/ucalendar/dayvalues/val"> 
     661                  <xsl:for-each select="/bedework/dayvalues/val"> 
    432662                    <xsl:variable name="temp" select="."/> 
    433663                    <xsl:variable name="pos" select="position()"/> 
    434664                    <xsl:choose> 
    435                       <xsl:when test="/ucalendar/dayvalues[start=$temp]"> 
     665                      <xsl:when test="/bedework/dayvalues[start=$temp]"> 
    436666                        <option value="{$temp}" selected="selected"> 
    437                           <xsl:value-of select="/ucalendar/daylabels/val[position()=$pos]"/> 
     667                          <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    438668                        </option> 
    439669                      </xsl:when> 
    440670                      <xsl:otherwise> 
    441671                        <option value="{$temp}"> 
    442                           <xsl:value-of select="/ucalendar/daylabels/val[position()=$pos]"/> 
     672                          <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    443673                        </option> 
    444674                      </xsl:otherwise> 
     
    450680          </xsl:if> 
    451681          <td> 
    452             <xsl:variable name="temp" select="/ucalendar/yearvalues/start"/> 
     682            <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
    453683            <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
    454684          </td> 
     
    461691  </xsl:template> 
    462692 
    463   <xsl:template name="footer"> 
    464     <p align="center"> 
    465       <a href="http://www.rpi.edu/pda/">Return to the Portable Rensselaer</a><br /> 
    466       <small>Maintained by C&amp;CT, DotCIO<br />Rensselaer Polytechnic Institute</small> 
    467     </p> 
     693  <!--==== UTILITY TEMPLATES ====--> 
     694 
     695  <!-- search and replace template taken from 
     696       http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html --> 
     697  <xsl:template name="replace"> 
     698    <xsl:param name="string" select="''"/> 
     699    <xsl:param name="pattern" select="''"/> 
     700    <xsl:param name="replacement" select="''"/> 
     701    <xsl:choose> 
     702      <xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)"> 
     703        <xsl:value-of select="substring-before($string, $pattern)"/> 
     704        <xsl:copy-of select="$replacement"/> 
     705        <xsl:call-template name="replace"> 
     706          <xsl:with-param name="string" select="substring-after($string, $pattern)"/> 
     707          <xsl:with-param name="pattern" select="$pattern"/> 
     708          <xsl:with-param name="replacement" select="$replacement"/> 
     709        </xsl:call-template> 
     710      </xsl:when> 
     711      <xsl:otherwise> 
     712        <xsl:value-of select="$string"/> 
     713      </xsl:otherwise> 
     714    </xsl:choose> 
    468715  </xsl:template> 
     716 
    469717</xsl:stylesheet>