PERFORCE change 172335 for review
Gabor Pali
pgj at FreeBSD.org
Mon Dec 28 22:43:09 UTC 2009
http://p4web.freebsd.org/chv.cgi?CH=172335
Change 172335 by pgj at Binturong on 2009/12/28 22:42:12
Fix country matching routines for generating FreeBSD-related
events map chart.
Submitted by: bland
Affected files ...
.. //depot/projects/docproj_hu/www/hu/share/sgml/templates.events.xsl#6 edit
Differences ...
==== //depot/projects/docproj_hu/www/hu/share/sgml/templates.events.xsl#6 (text+ko) ====
@@ -66,7 +66,7 @@
use="concat(startdate/year, format-number(startdate/month, '00'))"/>
<xsl:key name="event-by-country" match="event"
- use="location/country" />
+ use="location/country/@code" />
<xsl:key name="upcoming-event-by-country" match="event[((number(enddate/year) > number($curdate.year)) or
(number(enddate/year) = number($curdate.year) and
@@ -74,7 +74,7 @@
(number(enddate/year) = number($curdate.year) and
number(enddate/month) = number($curdate.month) and
enddate/day >= $curdate.day))]"
- use="location/country" />
+ use="location/country/@code" />
<xsl:variable name="charturl" select="'http://chart.apis.google.com/chart?cht=t&chs=400x200&chtm=world&chco=ffffff,ffbe38,600000&chf=bg,s,4D89F9'" />
@@ -83,8 +83,8 @@
<xsl:variable name="chart-countries">
<xsl:for-each select="event[
generate-id() =
- generate-id(key('event-by-country', location/country)[1])]">
- <xsl:sort select="format-number(count(key('event-by-country', location/country)), '000')" order="descending"/>
+ generate-id(key('event-by-country', location/country/@code)[1])]">
+ <xsl:sort select="format-number(count(key('event-by-country', location/country/@code)), '000')" order="descending"/>
<xsl:value-of select="location/country/@code" />
</xsl:for-each>
</xsl:variable>
@@ -92,10 +92,10 @@
<xsl:variable name="chart-country-counts">
<xsl:for-each select="event[
generate-id() =
- generate-id(key('event-by-country', location/country)[1])]">
- <xsl:sort select="format-number(count(key('event-by-country', location/country)), '000')" order="descending"/>
- <xsl:if test="count(key('upcoming-event-by-country', location/country)) != 0">100.0</xsl:if>
- <xsl:if test="count(key('upcoming-event-by-country', location/country)) = 0"><xsl:value-of select="count(key('event-by-country', location/country))" />.0</xsl:if>
+ generate-id(key('event-by-country', location/country/@code)[1])]">
+ <xsl:sort select="format-number(count(key('event-by-country', location/country/@code)), '000')" order="descending"/>
+ <xsl:if test="count(key('upcoming-event-by-country', location/country/@code)) != 0">100.0</xsl:if>
+ <xsl:if test="count(key('upcoming-event-by-country', location/country/@code)) = 0"><xsl:value-of select="count(key('event-by-country', location/country/@code))" />.0</xsl:if>
<xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>
</xsl:variable>
More information about the p4-projects
mailing list