Convert the community page to XSLT from SGML so we can pull in various

XML files and use them to generate dynamic content.  For now, just use
this to mention the number of freebsd related events and the number of
unique countries in which they were held in the last year according to
events.xml.

We could also list some high level statistics about usergroups here
since that content is also maintained in XML.
This commit is contained in:
Murray Stokely 2008-04-20 03:22:44 +00:00
parent 263870ac87
commit 31c4709880
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=31874
3 changed files with 93 additions and 39 deletions

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/Makefile,v 1.142 2007/05/15 23:11:04 keramida Exp $
# $FreeBSD: www/en/Makefile,v 1.143 2008/02/10 09:41:24 keramida Exp $
.if exists(Makefile.conf)
.include "Makefile.conf"
@ -14,7 +14,6 @@ DOCS+= administration.sgml
DOCS+= applications.sgml
DOCS+= art.sgml
DOCS+= availability.sgml
DOCS+= community.sgml
DOCS+= docs.sgml
DOCS+= features.sgml
DOCS+= internet.sgml
@ -35,6 +34,8 @@ XMLDOCS+= usergroups:${XSL_USERGROUPS}:${XML_USERGROUPS}:
DEPENDSET.usergroups=transtable usergroups
PARAMS.usergroups= --param pagename "'FreeBSD User Groups'"
XMLDOCS+= community::${XML_EVENTS_EVENTS}:
# These will be directly installed.
DATA= favicon.ico

View file

@ -1,37 +0,0 @@
<!doctype HTML PUBLIC "-//FreeBSD//DTD HTML 4.01 Transitional-Based Extension//EN" [
<!ENTITY date "$FreeBSD: www/en/community.sgml,v 1.5 2008/01/23 13:22:21 ceri Exp $">
<!ENTITY title "FreeBSD Community">
<!ENTITY % navinclude.community "INCLUDE">
]>
<html>
&header;
<p>FreeBSD is well supported by its active community.</p>
<p>There are more than one hundred <a href="&base;/community/mailinglists.html">mailing lists</a>
and several <a href="&base;/community/newsgroups.html">newsgroups</a> available.
There are a number of FreeBSD <a href="&base;/usergroups.html">User Groups</a> around the world,
and there is also an active <a
href="&base;/community/irc.html">IRC</a> community. Many
developers also maintain <a
href="http://planet.freebsdish.org">blogs</a> about their FreeBSD
work.</p>
<p>Each year there are dozens of FreeBSD events in countries
all over the world. A calendar and RSS feed of upcoming
FreeBSD-related events are maintained on our <a
href="&base;/events/events.html">events page</a>.</p>
&footer;
</body>
</html>
<!--
Local Variables:
mode: sgml
sgml-indent-data: t
sgml-omittag: nil
sgml-always-quote-attributes: t
End:
-->

90
en/community.xsl Normal file
View file

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
<!ENTITY title "FreeBSD Community">
<!ENTITY email "freebsd-www">
<!ENTITY base "http://www.FreeBSD.org/">
<!ENTITY % navinclude.community "INCLUDE">
]>
<!-- $FreeBSD$ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:cvs="http://www.FreeBSD.org/XML/CVS">
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
<xsl:variable name="date">
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
</xsl:variable>
<xsl:output method="xml" encoding="&xml.encoding;"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
<xsl:key name="last-year-event-by-country" match="event[number(enddate/year) = (number($curdate.year) - 1)]"
use="location/country" />
<xsl:key name="event-by-year" match="event" use="enddate/year" />
<xsl:template match="events">
<html>
&header1;
<body>
<div id="CONTAINERWRAP">
<div id="CONTAINER">
&header2;
<div id="CONTENT">
<div id="SIDEWRAP">
&nav;
</div> <!-- SIDEWRAP -->
<div id="CONTENTWRAP">
&header3;
<p>FreeBSD is well supported by its active
community.</p>
<p>There are more than one hundred <a
href="&base;/community/mailinglists.html">mailing
lists</a> and several <a
href="&base;/community/newsgroups.html">newsgroups</a>
available. There are a number of FreeBSD <a
href="&base;/usergroups.html">User Groups</a> around
the world, and there is also an active <a
href="&base;/community/irc.html">IRC</a> community. Many
developers also maintain <a
href="http://planet.freebsdish.org">blogs</a> about
their FreeBSD work.</p>
<p>Last year there were <xsl:value-of
select="count(event[number(enddate/year) =
(number($curdate.year) -1)])" /> FreeBSD events in
<xsl:value-of
select="count(event[(number(enddate/year) =
(number($curdate.year) -1)) and (generate-id() =
generate-id(key('last-year-event-by-country',
location/country)[1]))])" /> different countries
around the world. A <a
href="&base;/events/events.ics">calendar</a> and
<a href="&base;/events/rss.xml">RSS feed</a> of
upcoming FreeBSD-related events are maintained on our
<a href="&base;/events/events.html">events
page</a>.</p>
</div> <!-- CONTENTWRAP -->
<br class="clearboth" />
</div> <!-- CONTENT -->
<div id="FOOTER">
&copyright;<br />
&date;
</div> <!-- FOOTER -->
</div> <!-- CONTAINER -->
</div> <!-- CONTAINERWRAP -->
</body>
</html>
</xsl:template>
</xsl:stylesheet>