Changeset 1705

Show
Ignore:
Timestamp:
01/18/08 08:09:43
Author:
kllin
Message:

merging our xsl and i18n changes to xslt-rewrite branch

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/xslt-rewrite/build.xml

    r1623 r1705  
    5757  <property name="org.bedework.project.webdav" 
    5858            location="${org.bedework.projects}/webdav" /> 
     59 
     60 
     61  <target name="i18n" description="Creates lang.xsl from bedework.properties"> 
     62    <javac srcdir="util" /> 
     63    <jar destfile="util/make-lang.jar" 
     64         basedir="util" 
     65         includes="**/*.class" /> 
     66    <java classname="MakeLang" 
     67          classpath="util/make-lang.jar" 
     68          fork="true"> 
     69      <!-- read from file ...--> 
     70      <arg value="deployment/resources/i18n/bedework.properties" /> 
     71      <!-- and write to file --> 
     72      <arg value="deployment/resources/xsl/default/default/lang.xsl" /> 
     73    </java> 
     74    <delete> 
     75      <fileset dir="util" includes="*.class *.jar"/> 
     76    </delete> 
     77  </target> 
    5978 
    6079  <target name="README" depends="init" 
     
    213232                                build.webdav,build.caldav,build.caldavTest, 
    214233                                build.freebusy,build.bwtools,build.webapps, 
    215                                 build.testsuite,build.deployutil
     234                                build.testsuite,build.deployutil,i18n
    216235          description="builds the project"/> 
    217236 
     
    224243    <delete dir="${dist.home}" /> 
    225244    <delete dir="${bin.home}" /> 
     245        <delete file="deployment/resources/xsl/default/default/lang.xsl"/> 
    226246  </target> 
    227247 
  • branches/xslt-rewrite/build/buildfilters.xml

    r1281 r1705  
    1414    <filter token="HIBERNATE-DIALECT" 
    1515            value="${org.bedework.global.hibernate.dialect}" /> 
     16 
     17    <filter token="JDBC-DRIVER" 
     18            value="${org.bedework.global.jdbcdriver}" /> 
     19 
     20    <filter token="JDBC-URL" 
     21            value="${org.bedework.global.jdbcurl}" /> 
     22 
     23    <filter token="JDBC-ID" 
     24            value="${org.bedework.global.jdbcid}" /> 
     25 
     26    <filter token="JDBC-PW" 
     27            value="${org.bedework.global.jdbcpw}" /> 
    1628 
    1729    <filter token="SECOND-LEVEL-CACHING" 
  • branches/xslt-rewrite/build/buildwar.xml

    r1605 r1705  
    169169 
    170170    <!-- =============================================================== 
     171         Add all java resource bundles 
     172         =============================================================== --> 
     173    <copy todir="${app.dest.classes}"> 
     174      <fileset dir="${project.home}/deployment/resources/i18n"> 
     175        <include name="*.properties" /> 
     176      </fileset> 
     177    </copy> 
     178 
     179    <!-- =============================================================== 
    171180         Add hibernate jars and property files from calendar api. 
    172181         =============================================================== --> 
    173  
    174182    <copy todir="${app.dest.classes}"> 
    175183      <fileset dir="${org.bedework.project.calendarapi}/calCore/resources/properties" /> 
  • branches/xslt-rewrite/deployment/resources/xsl/default/default/attendees.xsl

    r1636 r1705  
    55    <table id="attendees" class="widget" cellspacing="0"> 
    66      <tr> 
    7         <th colspan="4">Attendees</th> 
     7        <th colspan="4"><xsl:value-of select="$attendees.attendees.attendees" /></th> 
    88      </tr> 
    99      <tr class="subHead"> 
    1010        <xsl:if test="$trash = 'yes'"><td></td></xsl:if> 
    11         <td>attendee</td> 
    12         <td>role</td> 
    13         <td>status</td> 
     11        <td><xsl:value-of select="$attendees.attendees.attendee" /></td> 
     12        <td><xsl:value-of select="$attendees.attendees.role" /></td> 
     13        <td><xsl:value-of select="$attendees.attendees.status" /></td> 
    1414      </tr> 
    1515      <xsl:for-each select="attendee"> 
     
    6262        <xsl:choose> 
    6363          <xsl:when test="form/status = 'CANCELLED'"> 
    64             Meeting Cancelled 
     64            <xsl:value-of select="$attendees.attendeeRespond.meeting.cancelled" /> 
    6565          </xsl:when> 
    6666          <xsl:otherwise> 
    67             Meeting Request 
     67            <xsl:value-of select="$attendees.attendeeRespond.meeting.request" /> 
    6868            <xsl:if test="guidcals/calendar"> (update)</xsl:if> 
    6969          </xsl:otherwise> 
     
    7373        <tr> 
    7474          <th colspan="2" class="commonHeader"> 
    75             Organizer: 
     75            <xsl:value-of select="$attendees.attendeeRespond.meeting.organizer" /> 
    7676            <xsl:choose> 
    7777              <xsl:when test="organizer/cn != ''"> 
     
    8787        <tr> 
    8888          <td class="fieldname"> 
    89             Calendar: 
     89            <xsl:value-of select="$attendees.attendeeRespond.meeting.calendar" /> 
    9090          </td> 
    9191          <td class="fieldval scheduleActions"> 
     
    177177        </tr> 
    178178        <tr> 
    179           <td class="fieldname">Action:</td> 
     179          <td class="fieldname"> 
     180           <xsl:value-of select="$attendees.attendeeRespond.action" /> 
     181          </td> 
    180182          <td class="fieldval scheduleActions"> 
    181183            <xsl:choose> 
     
    184186                <input type="hidden" name="method" value="REPLY"/> 
    185187                <select name="cancelAction"> 
    186                   <option value="mark">mark event as cancelled</option> 
    187                   <option value="delete">delete event</option> 
     188                  <option value="mark"> 
     189                    <xsl:value-of select="$attendees.attendeeRespond.mark.cancelled" /> 
     190                  </option> 
     191                  <option value="delete"> 
     192                    <xsl:value-of select="$attendees.attendeeRespond.mark.delete" /> 
     193                  </option> 
    188194                </select> 
    189195              </xsl:when> 
     
    192198                <input type="radio" name="method" value="REPLY" checked="checked" onclick="swapScheduleDisplay('hide');"/>reply as 
    193199                <select name="partstat"> 
    194                   <option value="ACCEPTED">accepted</option> 
    195                   <option value="DECLINED">declined</option> 
    196                   <option value="TENTATIVE">tentative</option> 
     200                  <option value="ACCEPTED"> 
     201                    <xsl:value-of select="$attendees.attendeeRespond.accepted" /> 
     202                  </option> 
     203                  <option value="DECLINED"> 
     204                    <xsl:value-of select="$attendees.attendeeRespond.declined" /> 
     205                  </option> 
     206                  <option value="TENTATIVE"> 
     207                    <xsl:value-of select="$attendees.attendeeRespond.tentative" /> 
     208                  </option> 
    197209                </select><br/> 
    198210                <!--<input type="radio" name="method" value="REFRESH" onclick="swapScheduleDisplay('hide');"/>refresh this event<br/>--> 
    199                 <input type="radio" name="method" value="DELEGATE" onclick="swapScheduleDisplay('hide');"/>delegate to 
    200                 <input type="test" name="delegate" value=""/> (uri or account)<br/> 
    201                 <input type="radio" name="method" value="COUNTER" onclick="swapScheduleDisplay('show');"/>counter (suggest a different date, time, and/or location) 
     211                <input type="radio" name="method" value="DELEGATE" onclick="swapScheduleDisplay('hide');"/><xsl:value-of select="$attendees.attendeeRespond.delegate" /> 
     212                <input type="test" name="delegate" value=""/> <xsl:value-of select="$attendees.attendeeRespond.uri.or.account" /><br/> 
     213                <input type="radio" name="method" value="COUNTER" onclick="swapScheduleDisplay('show');"/><xsl:value-of select="$attendees.attendeeRespond.counter" /> 
    202214              </xsl:otherwise> 
    203215            </xsl:choose> 
     
    205217        </tr> 
    206218        <tr id="scheduleDateEdit" class="invisible"> 
    207           <td class="fieldname">New Date/Time:</td> 
     219          <td class="fieldname"> 
     220            <xsl:value-of select="$attendees.attendeeRespond.new.date.time" /> 
     221          </td> 
    208222          <td class="fieldval scheduleActions"> 
    209223            <!-- Set the timefields class for the first load of the page; 
     
    228242              </xsl:otherwise> 
    229243            </xsl:choose> 
    230             all day event<br/> 
     244            <xsl:value-of select="$attendees.attendeeRespond.all.day.event" /> 
     245            <br/> 
    231246            <div class="dateStartEndBox"> 
    232               <strong>Start:</strong> 
     247              <strong><xsl:value-of select="$attendees.attendeeRespond.start" /></strong> 
    233248              <div class="dateFields"> 
    234                 <span class="startDateLabel">Date </span> 
     249                <span class="startDateLabel"><xsl:value-of select="$attendees.attendeeRespond.date" /> </span> 
    235250                <xsl:copy-of select="form/start/month/*"/> 
    236251                <xsl:copy-of select="form/start/day/*"/> 
     
    263278            </div> 
    264279            <div class="dateStartEndBox"> 
    265               <strong>End:</strong> 
     280              <strong><xsl:value-of select="$attendees.attendeeRespond.end" /></strong> 
    266281              <xsl:choose> 
    267282                <xsl:when test="form/end/type='E'"> 
     
    272287                </xsl:otherwise> 
    273288              </xsl:choose> 
    274               Date 
     289              <xsl:value-of select="$attendees.attendeeRespond.date" /> 
    275290              <xsl:variable name="endDateTimeClass"> 
    276291                <xsl:choose> 
     
    321336                  </xsl:otherwise> 
    322337                </xsl:choose> 
    323                 Duration 
     338                <xsl:value-of select="$attendees.attendeeRespond.duration" /> 
    324339                <xsl:variable name="endDurationClass"> 
    325340                  <xsl:choose> 
     
    389404                  </xsl:otherwise> 
    390405                </xsl:choose> 
    391                 This event has no duration / end date 
     406                <xsl:value-of select="$attendees.attendeeRespond.has.no.duration" /> 
    392407              </div> 
    393408            </div> 
     
    395410        </tr> 
    396411        <tr id="scheduleLocationEdit" class="invisible"> 
    397           <td class="fieldname">New Location:</td> 
     412          <td class="fieldname"><xsl:value-of select="$attendees.attendeeRespond.new.location" /></td> 
    398413          <td class="fieldval scheduleActions"> 
    399             <span class="std-text">choose: </span> 
     414            <span class="std-text"><xsl:value-of select="$attendees.attendeeRespond.choose" /> </span> 
    400415            <span id="eventFormLocationList"> 
    401416              <select name="eventLocationUid"> 
    402                 <option value="-1">select...</option> 
     417                <option value="-1"><xsl:value-of select="$attendees.attendeeRespond.select" /></option> 
    403418                <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 
    404419              </select> 
    405420            </span> 
    406             <span class="std-text"> or add new: </span> 
     421            <span class="std-text"> <xsl:value-of select="$attendees.attendeeRespond.add.new" /> </span> 
    407422            <input type="text" name="locationAddress.value" value="" /> 
    408423          </td> 
    409424        </tr> 
    410425        <tr> 
    411           <td class="fieldname">Comment:</td> 
     426          <td class="fieldname"><xsl:value-of select="$attendees.attendeeRespond.comment" /></td> 
    412427          <td class="fieldval scheduleActions"> 
    413428            <textarea name="comment" cols="60" rows="2"> 
     
    425440        <tr> 
    426441          <td class="fieldname"> 
    427             Title: 
     442            <xsl:value-of select="$attendees.attendeeRespond.title" /> 
    428443          </td> 
    429444          <td class="fieldval"> 
     
    432447        </tr> 
    433448        <tr> 
    434           <td class="fieldname">Description:</td> 
     449          <td class="fieldname"><xsl:value-of select="$attendees.attendeeRespond.description" /></td> 
    435450          <td class="fieldval"> 
    436451            <xsl:value-of select="/bedework/formElements/form/desc/textarea"/> 
     
    439454        <tr> 
    440455          <td class="fieldname"> 
    441             Date &amp; Time: 
     456            <xsl:value-of select="$attendees.attendeeRespond.date.and.time" /> 
    442457          </td> 
    443458          <td class="fieldval"> 
     
    457472            <xsl:if test="form/allDay/input/@checked='checked'"> 
    458473              <xsl:text> </xsl:text> 
    459               (all day) 
     474              <xsl:value-of select="$attendees.attendeeRespond.all.day" /> 
    460475            </xsl:if> 
    461476          </td> 
    462477        </tr> 
    463478        <tr> 
    464           <td class="fieldname">Location:</td> 
     479          <td class="fieldname"><xsl:value-of select="$attendees.attendeeRespond.location" /></td> 
    465480          <td class="fieldval" align="left"> 
    466481            <xsl:if test="location/address = ''"> 
    467              <em>not specified</em> 
     482             <em><xsl:value-of select="$attendees.attendeeRespond.not.specified" /></em> 
    468483            </xsl:if> 
    469484            <xsl:value-of select="location/address"/> 
     
    472487        <xsl:if test="attendee"> 
    473488          <tr> 
    474             <td class="fieldname">Attendees:</td> 
     489            <td class="fieldname"><xsl:value-of select="$attendees.attendeeRespond.attendees" /></td> 
    475490            <td class="fieldval"> 
    476491              <table id="attendees" cellspacing="0"> 
    477492                <tr> 
    478                   <th>role</th> 
    479                   <th>status</th> 
    480                   <th>attendee</th> 
     493                  <th><xsl:value-of select="$attendees.attendeeRespond.role" /></th> 
     494                  <th><xsl:value-of select="$attendees.attendeeRespond.status" /></th> 
     495                  <th><xsl:value-of select="$attendees.attendeeRespond.attendee" /></th> 
    481496                </tr> 
    482497                <xsl:for-each select="attendee"> 
     
    530545        <xsl:if test="form/link/input/@value != ''"> 
    531546          <tr> 
    532             <td class="fieldname">See:</td> 
     547            <td class="fieldname"><xsl:value-of select="$attendees.attendeeRespond.see" /></td> 
    533548            <td class="fieldval"> 
    534549              <a> 
     
    542557        <tr> 
    543558          <td class="fieldname"> 
    544             Status: 
     559            <xsl:value-of select="$attendees.attendeeRespond.status2" /> 
    545560          </td> 
    546561          <td class="fieldval"> 
  • branches/xslt-rewrite/deployment/resources/xsl/default/default/boxes.xsl

    r1622 r1705  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33  <xsl:template match="inbox"> 
    4     <h2 class="common">Inbox</h2> 
     4    <h2 class="common"> <xsl:value-of select="$boxes.inbox.inbox" /></h2> 
    55    <table id="inoutbox" class="common" cellspacing="0"> 
    66      <tr> 
    77        <th class="commonHeader">&#160;</th> 
    8         <th class="commonHeader">sent</th> 
    9         <th class="commonHeader">from</th> 
    10         <th class="commonHeader">title</th> 
    11         <th class="commonHeader">start</th> 
    12         <th class="commonHeader">end</th> 
    13         <th class="commonHeader">method</th> 
     8        <th class="commonHeader"><xsl:value-of select="$boxes.inbox.sent" /></th> 
     9        <th class="commonHeader"><xsl:value-of select="$boxes.inbox.from" /></th> 
     10        <th class="commonHeader"><xsl:value-of select="$boxes.inbox.title" /></th> 
     11        <th class="commonHeader"><xsl:value-of select="$boxes.inbox.start" /></th> 
     12        <th class="commonHeader"><xsl:value-of select="$boxes.inbox.end" /></th> 
     13        <th class="commonHeader"><xsl:value-of select="$boxes.inbox.method" /></th> 
    1414        <!--<th class="commonHeader">status</th>--> 
    1515        <th class="commonHeader">&#160;</th> 
     
    3535          <xsl:attribute name="class"> 
    3636            <xsl:choose> 
    37               <xsl:when test="scheduleState=0">unprocessed</xsl:when> 
    38               <xsl:when test="scheduleMethod=1">publish</xsl:when> 
    39               <xsl:when test="scheduleMethod=2">request</xsl:when> 
    40               <xsl:when test="scheduleMethod=5">cancel</xsl:when> 
    41               <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> 
     37              <xsl:when test="scheduleState=0"><xsl:value-of select="$boxes.inbox.unprocessed"/></xsl:when> 
     38              <xsl:when test="scheduleMethod=1"><xsl:value-of select="$boxes.inbox.publish"/></xsl:when> 
     39              <xsl:when test="scheduleMethod=2"><xsl:value-of select="$boxes.inbox.request"/></xsl:when> 
     40              <xsl:when test="scheduleMethod=5"><xsl:value-of select="$boxes.inbox.cancel"/></xsl:when> 
     41              <xsl:when test="scheduleMethod=7 or scheduleMethod=8"><xsl:value-of select="$boxes.inbox.counter"/></xsl:when> 
    4242            </xsl:choose> 
    4343          </xsl:attribute> 
     
    136136 
    137137  <xsl:template match="outbox"> 
    138     <h2 class="common">Outbox</h2> 
     138    <h2 class="common"><xsl:value-of select="$boxes.outbox.outbox"/></h2> 
    139139    <table id="inoutbox" class="common" cellspacing="0"> 
    140140      <tr> 
    141141        <th class="commonHeader">&#160;</th> 
    142         <th class="commonHeader">sent</th> 
    143         <th class="commonHeader">organizer</th> 
    144         <th class="commonHeader">title</th> 
    145         <th class="commonHeader">start</th> 
    146         <th class="commonHeader">end</th> 
    147         <th class="commonHeader">method</th> 
    148         <th class="commonHeader">status</th> 
     142        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.sent"/></th> 
     143        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.organizer"/></th> 
     144        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.title"/></th> 
     145        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.start"/></th> 
     146        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.end"/></th> 
     147        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.method"/></th> 
     148        <th class="commonHeader"><xsl:value-of select="$boxes.outbox.status"/></th> 
    149149        <th class="commonHeader">&#160;</th> 
    150150        <th class="commonHeader">&#160;</th> 
     
    167167          <xsl:attribute name="class"> 
    168168            <xsl:choose> 
    169               <xsl:when test="scheduleMethod=1">publish</xsl:when> 
    170               <xsl:when test="scheduleMethod=2">request</xsl:when> 
    171               <xsl:when test="scheduleMethod=5">cancel</xsl:when> 
    172               <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> 
     169              <xsl:when test="scheduleMethod=1"><xsl:value-of select="$boxes.outbox.publish"/></xsl:when> 
     170              <xsl:when test="scheduleMethod=2"><xsl:value-of select="$boxes.outbox.request"/></xsl:when> 
     171              <xsl:when test="scheduleMethod=5"><xsl:value-of select="$boxes.outbox.cancel"/></xsl:when> 
     172              <xsl:when test="scheduleMethod=7 or scheduleMethod=8"><xsl:value-of select="$boxes.outbox.counter"/></xsl:when> 
    173173            </xsl:choose> 
    174174          </xsl:attribute> 
     
    218218            <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}"> 
    219219              <xsl:choose> 
    220                 <xsl:when test="scheduleState=0"><em>unprocessed</em></xsl:when> 
    221                 <xsl:otherwise>processed</xsl:otherwise> 
     220                <xsl:when test="scheduleState=0"><em><xsl:value-of select="$boxes.outbox.unprocessed"/></em></xsl:when> 
     221                <xsl:otherwise><xsl:value-of select="$boxes.outbox.processed"/></xsl:otherwise> 
    222222              </xsl:choose> 
    223223            </a> 
     
    241241  <xsl:template match="scheduleMethod"> 
    242242    <xsl:choose> 
    243       <xsl:when test="node()=1">publish</xsl:when> 
    244       <xsl:when test="node()=2">request</xsl:when> 
    245       <xsl:when test="node()=3">reply</xsl:when> 
    246       <xsl:when test="node()=4">add</xsl:when> 
    247       <xsl:when test="node()=5">cancel</xsl:when> 
    248       <xsl:when test="node()=6">refresh</xsl:when> 
    249       <xsl:when test="node()=7">counter</xsl:when> 
    250       <xsl:when test="node()=8">declined</xsl:when><!-- declinecounter --> 
    251       <xsl:otherwise>unknown</xsl:otherwise> 
     243      <xsl:when test="node()=1"><xsl:value-of select="$boxes.scheduleMethod.publish" /></xsl:when> 
     244      <xsl:when test="node()=2"><xsl:value-of select="$boxes.scheduleMethod.request" /></xsl:when> 
     245      <xsl:when test="node()=3"><xsl:value-of select="$boxes.scheduleMethod.reply" /></xsl:when> 
     246      <xsl:when test="node()=4"><xsl:value-of select="$boxes.scheduleMethod.add" /></xsl:when> 
     247      <xsl:when test="node()=5"><xsl:value-of select="$boxes.scheduleMethod.cancel" /></xsl:when> 
     248      <xsl:when test="node()=6"><xsl:value-of select="$boxes.scheduleMethod.refresh" /></xsl:when> 
     249      <xsl:when test="node()=7"><xsl:value-of select="$boxes.scheduleMethod.counter" /></xsl:when> 
     250      <xsl:when test="node()=8"><xsl:value-of select="$boxes.scheduleMethod.declined" /></xsl:when><!-- declinecounter --> 
     251      <xsl:otherwise><xsl:value-of select="$boxes.scheduleMethod.unknown" /></xsl:otherwise> 
    252252    </xsl:choose> 
    253253  </xsl:template> 
    254254</xsl:stylesheet> 
    255 <?xml version="1.0" encoding="UTF-8"?> 
    256 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    257   <xsl:template match="inbox"> 
    258     <h2 class="common">Inbox</h2> 
    259     <table id="inoutbox" class="common" cellspacing="0"> 
    260       <tr> 
    261         <th class="commonHeader">&#160;</th> 
    262         <th class="commonHeader">sent</th> 
    263         <th class="commonHeader">from</th> 
    264         <th class="commonHeader">title</th> 
    265         <th class="commonHeader">start</th> 
    266         <th class="commonHeader">end</th> 
    267         <th class="commonHeader">method</th> 
    268         <!--<th class="commonHeader">status</th>--> 
    269         <th class="commonHeader">&#160;</th> 
    270         <th class="commonHeader">&#160;</th> 
    271       </tr> 
    272       <xsl:for-each select="events/event"> 
    273         <xsl:sort select="lastmod" order="descending"/> 
    274         <xsl:variable name="guid" select="guid"/> 
    275         <xsl:variable name="subscriptionId" select="subscription/id"/> 
    276         <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    277         <xsl:variable name="eventName" select="name"/> 
    278         <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    279         <xsl:variable name="inboxItemAction"> 
    280           <xsl:choose> 
    281             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:when> 
    282             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    283             <xsl:when test="scheduleMethod=6"><xsl:value-of select="$schedule-processRefresh"/></xsl:when> 
    284             <xsl:when test="scheduleMethod=7"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    285             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:otherwise> 
    286           </xsl:choose> 
    287         </xsl:variable> 
    288         <tr> 
    289           <xsl:attribute name="class"> 
    290             <xsl:choose> 
    291               <xsl:when test="scheduleState=0">unprocessed</xsl:when> 
    292               <xsl:when test="scheduleMethod=1">publish</xsl:when> 
    293               <xsl:when test="scheduleMethod=2">request</xsl:when> 
    294               <xsl:when test="scheduleMethod=5">cancel</xsl:when> 
    295               <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> 
    296             </xsl:choose> 
    297           </xsl:attribute> 
    298           <td> 
    299             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    300               <img src="{$resourcesRoot}/resources/calIconSchedule-sm.gif" width="13" height="13" border="0" alt="check message"/> 
    301             </a> 
    302           </td> 
    303           <td> 
    304             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    305               <!--<xsl:value-of select="dtstamp/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="dtstamp/time"/>--> 
    306               <!--<xsl:value-of select="lastmod"/>--> 
    307               <xsl:variable name="dt" select="substring-before(lastmod,'T')"/> 
    308               <xsl:variable name="tm" select="substring-after(lastmod,'T')"/> 
    309               <xsl:value-of select="substring($dt,1,4)"/>-<xsl:value-of select="substring($dt,5,2)"/>-<xsl:value-of select="substring($dt,7,2)"/> 
    310               <xsl:text> </xsl:text> 
    311               <xsl:value-of select="substring($tm,1,2)"/>:<xsl:value-of select="substring($tm,3,2)"/> 
    312             </a> 
    313           </td> 
    314           <td> 
    315             <xsl:choose> 
    316               <xsl:when test="scheduleMethod = '1' or 
    317                               scheduleMethod = '2' or 
    318                               scheduleMethod = '4' or 
    319                               scheduleMethod = '5' or 
    320                               scheduleMethod = '8'"> 
    321                 <xsl:if test="organizer"> 
    322                   <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    323                   <xsl:choose> 
    324                     <xsl:when test="organizer/cn != ''"> 
    325                       <xsl:value-of select="organizer/cn"/> 
    326                     </xsl:when> 
    327                     <xsl:otherwise> 
    328                       <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    329                     </xsl:otherwise> 
    330                   </xsl:choose> 
    331                   <xsl:if test="organizer/organizerUri != ''"> 
    332                     <a href="{$organizerUri}" class="emailIcon" title="email"> 
    333                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    334                     </a> 
    335                   </xsl:if> 
    336                 </xsl:if> 
    337               </xsl:when> 
    338               <xsl:otherwise> 
    339                 <xsl:if test="attendees/attendee"> 
    340                   <!-- there will only be one attendee at this point --> 
    341                   <xsl:variable name="attendeeUri" select="attendees/attendee/attendeeUri"/> 
    342                   <xsl:choose> 
    343                     <xsl:when test="attendees/attendee/cn != ''"> 
    344                       <xsl:value-of select="attendees/attendee/cn"/> 
    345                     </xsl:when> 
    346                     <xsl:otherwise> 
    347                       <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> 
    348                     </xsl:otherwise> 
    349                   </xsl:choose> 
    350                   <xsl:if test="$attendeeUri != ''"> 
    351                     <a href="{$attendeeUri}" class="emailIcon" title="email"> 
    352                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    353                     </a> 
    354                   </xsl:if> 
    355                 </xsl:if> 
    356               </xsl:otherwise> 
    357             </xsl:choose> 
    358           </td> 
    359           <td> 
    360             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    361               <xsl:value-of select="title"/> 
    362             </a> 
    363           </td> 
    364           <td><xsl:value-of select="start/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="start/time"/></td> 
    365           <td><xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/></td> 
    366           <td><xsl:apply-templates select="scheduleMethod"/></td> 
    367           <!--<td> 
    368             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    369               <xsl:choose> 
    370                 <xsl:when test="scheduleState=0"><em>unprocessed</em></xsl:when> 
    371                 <xsl:otherwise>processed</xsl:otherwise> 
    372               </xsl:choose> 
    373             </a> 
    374           </td>--> 
    375           <td> 
    376             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    377             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="download"> 
    378               <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="download"/> 
    379             </a> 
    380           </td> 
    381           <td> 
    382             <a href="{$delInboxEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="delete"> 
    383               <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    384             </a> 
    385           </td> 
    386         </tr> 
    387       </xsl:for-each> 
    388     </table> 
    389   </xsl:template> 
    390  
    391   <xsl:template match="outbox"> 
    392     <h2 class="common">Outbox</h2> 
    393     <table id="inoutbox" class="common" cellspacing="0"> 
    394       <tr> 
    395         <th class="commonHeader">&#160;</th> 
    396         <th class="commonHeader">sent</th> 
    397         <th class="commonHeader">organizer</th> 
    398         <th class="commonHeader">title</th> 
    399         <th class="commonHeader">start</th> 
    400         <th class="commonHeader">end</th> 
    401         <th class="commonHeader">method</th> 
    402         <th class="commonHeader">status</th> 
    403         <th class="commonHeader">&#160;</th> 
    404         <th class="commonHeader">&#160;</th> 
    405       </tr> 
    406       <xsl:for-each select="events/event"> 
    407         <xsl:sort select="lastmod" order="descending"/> 
    408         <xsl:variable name="guid" select="guid"/> 
    409         <xsl:variable name="subscriptionId" select="subscription/id"/> 
    410         <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    411         <xsl:variable name="eventName" select="name"/> 
    412         <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    413         <xsl:variable name="inboxItemAction"> 
    414           <xsl:choose> 
    415             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:when> 
    416             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    417             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:otherwise> 
    418           </xsl:choose> 
    419         </xsl:variable> 
    420         <tr> 
    421           <xsl:attribute name="class"> 
    422             <xsl:choose> 
    423               <xsl:when test="scheduleMethod=1">publish</xsl:when> 
    424               <xsl:when test="scheduleMethod=2">request</xsl:when> 
    425               <xsl:when test="scheduleMethod=5">cancel</xsl:when> 
    426               <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> 
    427             </xsl:choose> 
    428           </xsl:attribute> 
    429           <td> 
    430             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    431               <img src="{$resourcesRoot}/resources/calIconSchedule-sm.gif" width="13" height="13" border="0" alt="check message"/> 
    432             </a> 
    433           </td> 
    434           <td> 
    435             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    436               <!-- <xsl:value-of select="dtstamp/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="dtstamp/time"/>--> 
    437               <!--<xsl:value-of select="lastmod"/>--> 
    438               <xsl:variable name="dt" select="substring-before(lastmod,'T')"/> 
    439               <xsl:variable name="tm" select="substring-after(lastmod,'T')"/> 
    440               <xsl:value-of select="substring($dt,1,4)"/>-<xsl:value-of select="substring($dt,5,2)"/>-<xsl:value-of select="substring($dt,7,2)"/> 
    441               <xsl:text> </xsl:text> 
    442               <xsl:value-of select="substring($tm,1,2)"/>:<xsl:value-of select="substring($tm,3,2)"/> 
    443             </a> 
    444           </td> 
    445           <td> 
    446             <xsl:if test="organizer"> 
    447               <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    448               <xsl:choose> 
    449                 <xsl:when test="organizer/cn != ''"> 
    450                   <xsl:value-of select="organizer/cn"/> 
    451                 </xsl:when> 
    452                 <xsl:otherwise> 
    453                   <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    454                 </xsl:otherwise> 
    455               </xsl:choose> 
    456               <xsl:if test="organizer/organizerUri != ''"> 
    457                 <a href="{$organizerUri}" class="emailIcon" title="email"> 
    458                   <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    459                 </a> 
    460               </xsl:if> 
    461             </xsl:if> 
    462           </td> 
    463           <td> 
    464             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}"> 
    465               <xsl:value-of select="title"/> 
    466             </a> 
    467           </td> 
    468           <td><xsl:value-of select="start/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="start/time"/></td> 
    469           <td><xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/></td> 
    470           <td><xsl:apply-templates select="scheduleMethod"/></td> 
    471           <td> 
    472             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}"> 
    473               <xsl:choose> 
    474                 <xsl:when test="scheduleState=0"><em>unprocessed</em></xsl:when> 
    475                 <xsl:otherwise>processed</xsl:otherwise> 
    476               </xsl:choose> 
    477             </a> 
    478           </td> 
    479           <td> 
    480             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    481             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="download"> 
    482               <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="download"/> 
    483             </a> 
    484           </td> 
    485           <td> 
    486             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete"> 
    487               <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    488             </a> 
    489           </td> 
    490         </tr> 
    491       </xsl:for-each> 
    492     </table> 
    493   </xsl:template> 
    494  
    495   <xsl:template match="scheduleMethod"> 
    496     <xsl:choose> 
    497       <xsl:when test="node()=1">publish</xsl:when> 
    498       <xsl:when test="node()=2">request</xsl:when> 
    499       <xsl:when test="node()=3">reply</xsl:when> 
    500       <xsl:when test="node()=4">add</xsl:when> 
    501       <xsl:when test="node()=5">cancel</xsl:when> 
    502       <xsl:when test="node()=6">refresh</xsl:when> 
    503       <xsl:when test="node()=7">counter</xsl:when> 
    504       <xsl:when test="node()=8">declined</xsl:when><!-- declinecounter --> 
    505       <xsl:otherwise>unknown</xsl:otherwise> 
    506     </xsl:choose> 
    507   </xsl:template> 
    508 </xsl:stylesheet> 
    509 <?xml version="1.0" encoding="UTF-8"?> 
    510 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    511   <xsl:template match="inbox"> 
    512     <h2 class="common">Inbox</h2> 
    513     <table id="inoutbox" class="common" cellspacing="0"> 
    514       <tr> 
    515         <th class="commonHeader">&#160;</th> 
    516         <th class="commonHeader">sent</th> 
    517         <th class="commonHeader">from</th> 
    518         <th class="commonHeader">title</th> 
    519         <th class="commonHeader">start</th> 
    520         <th class="commonHeader">end</th> 
    521         <th class="commonHeader">method</th> 
    522         <!--<th class="commonHeader">status</th>--> 
    523         <th class="commonHeader">&#160;</th> 
    524         <th class="commonHeader">&#160;</th> 
    525       </tr> 
    526       <xsl:for-each select="events/event"> 
    527         <xsl:sort select="lastmod" order="descending"/> 
    528         <xsl:variable name="guid" select="guid"/> 
    529         <xsl:variable name="subscriptionId" select="subscription/id"/> 
    530         <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    531         <xsl:variable name="eventName" select="name"/> 
    532         <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    533         <xsl:variable name="inboxItemAction"> 
    534           <xsl:choose> 
    535             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:when> 
    536             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    537             <xsl:when test="scheduleMethod=6"><xsl:value-of select="$schedule-processRefresh"/></xsl:when> 
    538             <xsl:when test="scheduleMethod=7"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    539             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:otherwise> 
    540           </xsl:choose> 
    541         </xsl:variable> 
    542