Changeset 1972
- Timestamp:
- 11/19/08 16:37:10
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl
r1971 r1972 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 2 <xsl:stylesheet 3 version="1.0" 4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 5 xmlns:url="http://whatever/java/java.net.URLEncoder" 6 exclude-result-prefixes="url"> 3 7 <xsl:output 4 8 method="xhtml" … … 977 981 <xsl:variable name="subscriptionId" select="subscription/id"/> 978 982 <xsl:variable name="calPath" select="calendar/encodedPath"/> 979 <xsl:variable name="guid" select="guid"/>983 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 980 984 <xsl:variable name="recurrenceId" select="recurrenceId"/> 981 985 <tr> … … 1127 1131 <xsl:variable name="subscriptionId" select="subscription/id"/> 1128 1132 <xsl:variable name="calPath" select="calendar/encodedPath"/> 1129 <xsl:variable name="guid" select="guid"/>1133 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 1130 1134 <xsl:variable name="recurrenceId" select="recurrenceId"/> 1131 1135 <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> … … 1290 1294 <xsl:variable name="subscriptionId" select="subscription/id"/> 1291 1295 <xsl:variable name="calPath" select="calendar/encodedPath"/> 1292 <xsl:variable name="guid" select="guid"/>1296 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 1293 1297 <xsl:variable name="recurrenceId" select="recurrenceId"/> 1294 1298 <xsl:variable name="eventRootClass"> … … 1496 1500 <xsl:variable name="subscriptionId" select="subscription/id"/> 1497 1501 <xsl:variable name="calPath" select="calendar/encodedPath"/> 1498 <xsl:variable name="guid" select="guid"/>1502 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 1499 1503 <xsl:variable name="recurrenceId" select="recurrenceId"/> 1500 1504 … … 1517 1521 <xsl:variable name="subscriptionId" select="subscription/id"/> 1518 1522 <xsl:variable name="calPath" select="calendar/encodedPath"/> 1519 <xsl:variable name="guid" select="guid"/>1523 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 1520 1524 <xsl:variable name="recurrenceId" select="recurrenceId"/> 1521 1525 <xsl:variable name="statusClass"> … … 2101 2105 <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 2102 2106 <xsl:variable name="calPath" select="form/calendar/path"/> 2103 <xsl:variable name="guid" select="guid"/>2107 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 2104 2108 <xsl:variable name="recurrenceId" select="recurrenceId"/> 2105 2109 <input type="hidden" name="endType" value="date"/> … … 3963 3967 <xsl:variable name="subscriptionId" select="subscription/id"/> 3964 3968 <xsl:variable name="calPath" select="calendar/path"/> 3965 <xsl:variable name="guid" select="guid"/>3969 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 3966 3970 <xsl:variable name="recurrenceId" select="recurrenceId"/> 3967 3971 <input type="hidden" name="subid" value="{$subscriptionId}"/> … … 5838 5842 <xsl:for-each select="events/event"> 5839 5843 <xsl:sort select="lastmod" order="descending"/> 5840 <xsl:variable name="guid" select="guid"/>5844 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 5841 5845 <xsl:variable name="subscriptionId" select="subscription/id"/> 5842 5846 <xsl:variable name="calPath" select="calendar/encodedPath"/> … … 5972 5976 <xsl:for-each select="events/event"> 5973 5977 <xsl:sort select="lastmod" order="descending"/> 5974 <xsl:variable name="guid" select="guid"/>5978 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 5975 5979 <xsl:variable name="subscriptionId" select="subscription/id"/> 5976 5980 <xsl:variable name="calPath" select="calendar/encodedPath"/> … … 6077 6081 <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 6078 6082 <xsl:variable name="calPath" select="form/calendar/path"/> 6079 <xsl:variable name="guid" select="guid"/>6083 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 6080 6084 <xsl:variable name="recurrenceId" select="recurrenceId"/> 6081 6085 <!-- The name "eventForm" is referenced by several javascript functions. Do not … … 6613 6617 <xsl:variable name="subscriptionId" select="subscription/id"/> 6614 6618 <xsl:variable name="calPath" select="calendar/encodedPath"/> 6615 <xsl:variable name="guid" select="guid"/>6619 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 6616 6620 <xsl:variable name="recurrenceId" select="recurrenceId"/> 6617 6621 <xsl:variable name="statusClass"> … … 6859 6863 <xsl:variable name="subscriptionId" select="subscription/id"/> 6860 6864 <xsl:variable name="calPath" select="calendar/path"/> 6861 <xsl:variable name="guid" select="guid"/>6865 <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable> 6862 6866 <xsl:variable name="recurrenceId" select="recurrenceId"/> 6863 6867 <input type="hidden" name="subid" value="{$subscriptionId}"/> … … 8274 8278 </xsl:choose> 8275 8279 </xsl:template> 8280 8281 <!-- URL-encoding template Written by Mike J. Brown, mike@skew.org. 8282 http://skew.org/xml/stylesheets/url-encode/ --> 8283 <xsl:template name="url-encode"> 8284 <xsl:param name="str"/> 8285 8286 <!-- Characters we'll support. We could add control chars 0-31 and 127-159, but we won't. --> 8287 <xsl:variable name="ascii"> !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~</xsl:variable> 8288 <xsl:variable name="latin1"> ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ</xsl:variable> 8289 8290 <!-- Characters that usually don't need to be escaped --> 8291 <xsl:variable name="safe">!'()*-.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz~</xsl:variable> 8292 8293 <xsl:variable name="hex">0123456789ABCDEF</xsl:variable> 8294 8295 <xsl:if test="$str"> 8296 <xsl:variable name="first-char" select="substring($str,1,1)"/> 8297 <xsl:choose> 8298 <xsl:when test="contains($safe,$first-char)"> 8299 <xsl:value-of select="$first-char"/> 8300 </xsl:when> 8301 <xsl:otherwise> 8302 <xsl:variable name="codepoint"> 8303 <xsl:choose> 8304 <xsl:when test="contains($ascii,$first-char)"> 8305 <xsl:value-of select="string-length(substring-before($ascii,$first-char)) + 32"/> 8306 </xsl:when> 8307 <xsl:when test="contains($latin1,$first-char)"> 8308 <xsl:value-of select="string-length(substring-before($latin1,$first-char)) + 160"/> 8309 </xsl:when> 8310 <xsl:otherwise> 8311 <xsl:message terminate="no">Warning: string contains a character that is out of range! Substituting "?".</xsl:message> 8312 <xsl:text>63</xsl:text> 8313 </xsl:otherwise> 8314 </xsl:choose> 8315 </xsl:variable> 8316 <xsl:variable name="hex-digit1" select="substring($hex,floor($codepoint div 16) + 1,1)"/> 8317 <xsl:variable name="hex-digit2" select="substring($hex,$codepoint mod 16 + 1,1)"/> 8318 <xsl:value-of select="concat('%',$hex-digit1,$hex-digit2)"/> 8319 </xsl:otherwise> 8320 </xsl:choose> 8321 <xsl:if test="string-length($str) > 1"> 8322 <xsl:call-template name="url-encode"> 8323 <xsl:with-param name="str" select="substring($str,2)"/> 8324 </xsl:call-template> 8325 </xsl:if> 8326 </xsl:if> 8327 </xsl:template> 8328 8276 8329 </xsl:stylesheet>
