with countries colored in according to the number of usergroups there using the Google Chart API.
		
			
				
	
	
		
			95 lines
		
	
	
	
		
			3.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			95 lines
		
	
	
	
		
			3.2 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
<?xml version="1.0"?>
 | 
						|
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD Fragment//EN"
 | 
						|
                                "http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
 | 
						|
<!ENTITY title "User Groups">
 | 
						|
<!ENTITY email "freebsd-www">
 | 
						|
<!ENTITY % navinclude.community "INCLUDE">
 | 
						|
]>
 | 
						|
 | 
						|
<!-- $FreeBSD: www/share/sgml/templates.usergroups.xsl,v 1.10 2008/04/20 22:22:34 murray Exp $ -->
 | 
						|
 | 
						|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
 | 
						|
  xmlns:cvs="http://www.FreeBSD.org/XML/CVS"
 | 
						|
  exclude-result-prefixes="cvs">
 | 
						|
  <xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
 | 
						|
 | 
						|
  <xsl:output method="xml"
 | 
						|
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
 | 
						|
    doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
 | 
						|
 | 
						|
  <xsl:variable name="date">
 | 
						|
    <xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
 | 
						|
  </xsl:variable>
 | 
						|
 | 
						|
  <xsl:key name="usergroup-by-country" match="entry"
 | 
						|
    use="../@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'" />
 | 
						|
 | 
						|
  <xsl:template match="/">
 | 
						|
    <html>
 | 
						|
      &header1;
 | 
						|
 | 
						|
      <body>
 | 
						|
	<div id="CONTAINERWRAP">
 | 
						|
	  <div id="CONTAINER">
 | 
						|
	    &header2;
 | 
						|
 | 
						|
	    <div id="CONTENT">
 | 
						|
	      <div id="SIDEWRAP">
 | 
						|
		&nav;
 | 
						|
	      </div> <!-- SIDEWRAP -->
 | 
						|
 | 
						|
	      <div id="CONTENTWRAP">
 | 
						|
		&header3;
 | 
						|
 | 
						|
  <xsl:variable name="chart-countries">
 | 
						|
    <xsl:for-each select="//entry[
 | 
						|
	generate-id() =
 | 
						|
	generate-id(key('usergroup-by-country', ../@code)[1])]">
 | 
						|
<!--      <xsl:sort select="format-number(count(key('event-by-country', location/country)), '000')" order="descending"/>
 | 
						|
-->
 | 
						|
        <xsl:value-of select="../@code" />
 | 
						|
    </xsl:for-each>
 | 
						|
  </xsl:variable>
 | 
						|
 | 
						|
  <xsl:variable name="chart-country-counts">
 | 
						|
    <xsl:for-each select="//entry[
 | 
						|
	generate-id() =
 | 
						|
	generate-id(key('usergroup-by-country', ../@code)[1])]">
 | 
						|
        <xsl:value-of select="count(key('usergroup-by-country', ../@code))" />.0<xsl:if test="position()!=last()">,</xsl:if></xsl:for-each>
 | 
						|
  </xsl:variable>
 | 
						|
 | 
						|
  <xsl:variable name="imageurl"><xsl:value-of select="$charturl"/>&chd=t:<xsl:value-of select="$chart-country-counts"/>&chld=<xsl:value-of select="$chart-countries"/></xsl:variable>
 | 
						|
 | 
						|
	<xsl:call-template name="html-usergroups-list-header" />
 | 
						|
 | 
						|
	<xsl:call-template name="html-usergroups-list-regions">
 | 
						|
          <xsl:with-param name="usergroups.xml" select="$usergroups.xml" />
 | 
						|
          <xsl:with-param name="usergroups-local.xml" select="$usergroups-local.xml" />
 | 
						|
	</xsl:call-template>
 | 
						|
 | 
						|
	<xsl:call-template name="html-usergroups-map">
 | 
						|
	  <xsl:with-param name="mapurl" select="$imageurl" />
 | 
						|
	</xsl:call-template>
 | 
						|
 | 
						|
	<xsl:call-template name="html-usergroups-list-entries">
 | 
						|
          <xsl:with-param name="usergroups.xml" select="$usergroups.xml" />
 | 
						|
          <xsl:with-param name="usergroups-local.xml" select="$usergroups-local.xml" />
 | 
						|
	</xsl:call-template>
 | 
						|
 | 
						|
	      </div> <!-- CONTENTWRAP -->
 | 
						|
 | 
						|
	      <br class="clearboth" />
 | 
						|
	    </div> <!-- CONTENT -->
 | 
						|
 | 
						|
	    <div id="FOOTER">
 | 
						|
	      ©right;<br />
 | 
						|
	      &date;
 | 
						|
	    </div> <!-- FOOTER -->
 | 
						|
	  </div> <!-- CONTAINER -->
 | 
						|
	</div> <!-- CONTAINERWRAP -->
 | 
						|
      </body>
 | 
						|
    </html>
 | 
						|
  </xsl:template>
 | 
						|
</xsl:stylesheet>
 |