- Extend xhtml.xsl instead of duplicating common structural parts
Approved by: doceng (implicit)
This commit is contained in:
parent
a77096151d
commit
7903bab9c4
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/projects/sgml2xml/; revision=39221
11 changed files with 34 additions and 290 deletions
|
@ -25,16 +25,7 @@
|
|||
|
||||
<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">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
</div> <!-- SIDEWRAP -->
|
||||
|
@ -71,10 +62,10 @@
|
|||
networking</a> sites.</p>
|
||||
|
||||
<p>Last year there were <xsl:value-of
|
||||
select="count(event[number(enddate/year) =
|
||||
select="count(/events/event[number(enddate/year) =
|
||||
(number($curdate.year) -1)])" /> &os; events in
|
||||
<xsl:value-of
|
||||
select="count(event[(number(enddate/year) =
|
||||
select="count(/events/event[(number(enddate/year) =
|
||||
(number($curdate.year) -1)) and (generate-id() =
|
||||
generate-id(key('last-year-event-by-country',
|
||||
location/country)[1]))])" /> different countries
|
||||
|
@ -147,16 +138,5 @@
|
|||
</div> <!-- Latest Videos -->
|
||||
</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>
|
||||
|
|
|
@ -11,25 +11,9 @@
|
|||
<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:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.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:template match="events">
|
||||
<html>
|
||||
&header1;
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
|
||||
<div id="CONTENT">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
</div> <!-- SIDEWRAP -->
|
||||
|
@ -74,16 +58,5 @@
|
|||
|
||||
</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>
|
||||
|
|
|
@ -12,20 +12,9 @@
|
|||
exclude-result-prefixes="rdf rdf1" version="1.0">
|
||||
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<xsl:output type="html" encoding="&xml.encoding;"
|
||||
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
&header1;
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
|
||||
<div id="CONTENT">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
</div> <!-- SIDEWRAP -->
|
||||
|
@ -72,6 +61,9 @@
|
|||
<div class="rightnav">
|
||||
|
||||
<h2>GNOME Project News</h2>
|
||||
<!-- XXX: (1) does not work at the moment
|
||||
(2) should we really copy over GNOME news?
|
||||
|
||||
<ul>
|
||||
<xsl:for-each select="document('http://gnomedesktop.org/node/feed')/rss/channel/*[name() = 'item'][position() < 10]">
|
||||
<li><a>
|
||||
|
@ -89,6 +81,7 @@
|
|||
</xsl:for-each>
|
||||
</a></li>
|
||||
</ul>
|
||||
-->
|
||||
</div> <!-- rightnav -->
|
||||
</div> <!-- rightwrap -->
|
||||
|
||||
|
@ -176,14 +169,5 @@
|
|||
</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>
|
||||
|
|
|
@ -16,23 +16,9 @@
|
|||
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:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:output type="html" encoding="&xml.encoding;"/>
|
||||
|
||||
<xsl:template match="news">
|
||||
<html>
|
||||
&header1;
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
|
||||
<div id="CONTENT">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
<div id="FEEDLINKS">
|
||||
|
@ -58,24 +44,16 @@
|
|||
<img src="&base;/gifs/news.jpg" align="right" border="0" width="193"
|
||||
height="144" alt="FreeBSD GNOME News"/>
|
||||
|
||||
<xsl:apply-templates select="descendant::month"/>
|
||||
<xsl:apply-templates select="/news/descendant::month"/>
|
||||
|
||||
<xsl:for-each select="/news">
|
||||
<xsl:call-template
|
||||
name="html-news-list-newsflash-homelink" />
|
||||
</xsl:for-each>
|
||||
|
||||
</div> <!-- contentwrap -->
|
||||
|
||||
<br class="clearboth" />
|
||||
</div> <!-- content -->
|
||||
|
||||
<div id="FOOTER">
|
||||
©right;<br />
|
||||
&date;
|
||||
</div> <!-- FOOTER -->
|
||||
</div> <!-- container -->
|
||||
</div> <!-- containerwrap -->
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Everything that follows are templates for the rest of the content -->
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/lang/share/sgml/libcommon.xsl"/>
|
||||
<xsl:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<!-- these params should be externally bound. The values
|
||||
here are not used actually -->
|
||||
|
@ -22,53 +23,7 @@
|
|||
<xsl:param name="events.xml" select="'none'"/>
|
||||
<xsl:param name="html.header.script.google" select="'IGNORE'"/>
|
||||
|
||||
<xsl:output type="html" encoding="&xml.encoding;"
|
||||
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<html>
|
||||
<head>
|
||||
<title>&title;</title>
|
||||
<meta name="description" content="The FreeBSD Project"/>
|
||||
<meta name="keywords" content="FreeBSD, BSD, UNIX, Support, Ports,
|
||||
Release, Application, Software, Handbook, FAQ, Tutorials, Bugs,
|
||||
CVS, CVSup, News, Commercial Vendors, homepage, CTM, Unix"/>
|
||||
<link rel="shortcut icon" href="&base;/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="icon" href="&base;/favicon.ico" type="image/x-icon"/>
|
||||
<!--
|
||||
FOR TRANSLATORS:
|
||||
|
||||
Do not translate the "Normal Text" and "Large Text" attributes in the
|
||||
following two lines. They are not literal texts but JavaScript
|
||||
parameters. Changing them will result in rendering errors.
|
||||
-->
|
||||
<link rel="stylesheet" media="screen" href="&base;/layout/css/fixed.css?20060509" type="text/css" title="Normal Text" />
|
||||
<link rel="alternate stylesheet" media="screen" href="&base;/layout/css/fixed_large.css" type="text/css" title="Large Text" />
|
||||
<script type="text/javascript" src="&base;/layout/js/styleswitcher.js"></script>
|
||||
<xsl:if test="$html.header.script.google != 'IGNORE'">
|
||||
<script type="text/javascript" src="&base;/layout/js/google.js"></script>
|
||||
</xsl:if>
|
||||
<link rel="alternate" type="application/rss+xml"
|
||||
title="FreeBSD Project News" href="&base;/news/rss.xml" />
|
||||
<link rel="alternate" type="application/rss+xml"
|
||||
title="FreeBSD Security Advisories" href="&base;/security/rss.xml" />
|
||||
<link rel="alternate" type="application/rss+xml"
|
||||
title="FreeBSD GNOME Project News" href="&base;/gnome/rss.xml" />
|
||||
|
||||
<!-- Formatted to be easy to spam harvest, please do not reformat. -->
|
||||
<xsl:comment>
|
||||
Spamtrap, do not email:
|
||||
<a href="mailto:bruscar@freebsd.org">bruscar@freebsd.org</a>
|
||||
</xsl:comment>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
<div id="CONTENT">
|
||||
|
||||
<xsl:template name="process.content">
|
||||
<div id="FRONTCONTAINER">
|
||||
<div id="FRONTMAIN">
|
||||
<div id="FRONTFEATURECONTAINER">
|
||||
|
@ -349,9 +304,9 @@
|
|||
</div> <!-- FRONTNEMSCONTAINER -->
|
||||
</div> <!-- FRONTMAIN -->
|
||||
</div> <!-- FRONTCONTAINER -->
|
||||
</xsl:template>
|
||||
|
||||
</div> <!-- CONTENT -->
|
||||
<div id="FOOTER">
|
||||
<xsl:template name="process.footer">
|
||||
©right;
|
||||
|
||||
The mark FreeBSD is a registered trademark of The FreeBSD
|
||||
|
@ -359,13 +314,6 @@
|
|||
permission of <a
|
||||
href="http://www.freebsdfoundation.org/documents/Guidelines.shtml">The
|
||||
FreeBSD Foundation</a>.
|
||||
|
||||
</div> <!-- FOOTER -->
|
||||
</div> <!-- CONTAINER -->
|
||||
</div> <!-- CONTAINERWRAP -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
|
|
@ -16,23 +16,9 @@
|
|||
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:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:output type="html" encoding="&xml.encoding;"/>
|
||||
|
||||
<xsl:template match="news">
|
||||
<html>
|
||||
&header1;
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
|
||||
<div id="CONTENT">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
<div id="FEEDLINKS">
|
||||
|
@ -52,24 +38,16 @@
|
|||
<img src="&base;/gifs/news.jpg" align="right" border="0" width="193"
|
||||
height="144" alt="FreeBSD Java News"/>
|
||||
|
||||
<xsl:apply-templates select="descendant::month"/>
|
||||
<xsl:apply-templates select="/news/descendant::month"/>
|
||||
|
||||
<xsl:for-each select="/news">
|
||||
<xsl:call-template
|
||||
name="html-news-list-newsflash-homelink" />
|
||||
</xsl:for-each>
|
||||
|
||||
</div> <!-- contentwrap -->
|
||||
|
||||
<br class="clearboth" />
|
||||
</div> <!-- content -->
|
||||
|
||||
<div id="FOOTER">
|
||||
©right;<br />
|
||||
&date;
|
||||
</div> <!-- FOOTER -->
|
||||
</div> <!-- container -->
|
||||
</div> <!-- containerwrap -->
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Everything that follows are templates for the rest of the content -->
|
||||
|
|
|
@ -14,29 +14,14 @@
|
|||
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:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<xsl:variable name="ucletters"
|
||||
select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'"/>
|
||||
<xsl:variable name="lcletters"
|
||||
select="'abcdefghijklmnopqrstuvwxyz'"/>
|
||||
|
||||
<xsl:output type="html" encoding="iso-8859-1"/>
|
||||
|
||||
<xsl:template match="report">
|
||||
<html>
|
||||
&header1;
|
||||
|
||||
<body>
|
||||
|
||||
<div id="containerwrap">
|
||||
<div id="container">
|
||||
&header2;
|
||||
|
||||
<div id="content">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
</div> <!-- SIDEWRAP -->
|
||||
|
@ -45,12 +30,12 @@
|
|||
&header3;
|
||||
|
||||
<!-- Process all the <sections>, in order -->
|
||||
<xsl:apply-templates select="section"/>
|
||||
<xsl:apply-templates select="report/section"/>
|
||||
|
||||
<hr/>
|
||||
|
||||
<!-- Generate a table of contents, sorted -->
|
||||
<xsl:for-each select="category">
|
||||
<xsl:for-each select="report/category">
|
||||
<h3><xsl:value-of select="description"/></h3>
|
||||
<xsl:variable name="cat-short" select="name"/>
|
||||
<ul>
|
||||
|
@ -84,7 +69,7 @@
|
|||
<hr/>
|
||||
|
||||
<!-- Process each project, sorted -->
|
||||
<xsl:apply-templates select="project">
|
||||
<xsl:apply-templates select="report/project">
|
||||
<xsl:sort select="translate(title, $lcletters, $ucletters)"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
|
@ -93,15 +78,6 @@
|
|||
</div> <!-- contentwrap -->
|
||||
|
||||
<br class="clearboth" />
|
||||
</div> <!-- content -->
|
||||
<div id="FOOTER">
|
||||
©right;<br />
|
||||
&date;
|
||||
</div> <!-- FOOTER -->
|
||||
</div> <!-- container -->
|
||||
</div> <!-- containerwrap -->
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Everything that follows are templates for the rest of the content -->
|
||||
|
|
|
@ -85,15 +85,5 @@
|
|||
</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>
|
||||
|
|
|
@ -145,14 +145,5 @@
|
|||
</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>
|
||||
|
|
|
@ -12,25 +12,9 @@
|
|||
<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:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="ideas.xml" select="'ideas.xml'" />
|
||||
|
||||
<xsl:output type="html" encoding="&xml.encoding;"/>
|
||||
|
||||
<xsl:template match="ideas">
|
||||
<html>
|
||||
&header1;
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
|
||||
<div id="CONTENT">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
</div> <!-- SIDEWRAP -->
|
||||
|
@ -44,16 +28,5 @@
|
|||
|
||||
</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>
|
||||
|
|
|
@ -12,25 +12,9 @@
|
|||
<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:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:param name="ideas.xml" select="'ideas/ideas.xml'" />
|
||||
|
||||
<xsl:output type="html" encoding="&xml.encoding;"/>
|
||||
|
||||
<xsl:template match="ideas">
|
||||
<html>
|
||||
&header1;
|
||||
<body>
|
||||
|
||||
<div id="CONTAINERWRAP">
|
||||
<div id="CONTAINER">
|
||||
&header2;
|
||||
|
||||
<div id="CONTENT">
|
||||
<xsl:template name="process.content">
|
||||
<div id="SIDEWRAP">
|
||||
&nav;
|
||||
</div> <!-- SIDEWRAP -->
|
||||
|
@ -394,16 +378,5 @@ href="http://wiki.freebsd.org/moin.cgi/SummerOfCode2005">2005</a>].</p>
|
|||
|
||||
</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>
|
||||
|
|
Loading…
Reference in a new issue