XSL stylesheet to generate press.html, taking content from press.xml.
This commit is contained in:
parent
84841fcd1e
commit
66c30b5061
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=10288
1 changed files with 76 additions and 0 deletions
76
en/news/press.xsl
Normal file
76
en/news/press.xsl
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" ?>
|
||||
|
||||
<!-- $FreeBSD: www/en/news/newsflash.xsl,v 1.1 2001/08/06 06:59:11 nik Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
||||
<xsl:import href="../includes.xsl"/>
|
||||
<xsl:import href="includes.xsl"/>
|
||||
|
||||
|
||||
<xsl:variable name="base" select="'..'"/>
|
||||
<xsl:variable name="title" select="'FreeBSD In The Press'"/>
|
||||
<xsl:variable name="date" select="'$FreeBSD: www/en/news/newsflash.xsl,v 1.1 2001/08/06 06:59:11 nik Exp $'"/>
|
||||
|
||||
<xsl:output type="html" encoding="iso-8859-1"/>
|
||||
|
||||
<xsl:template match="press">
|
||||
<html>
|
||||
|
||||
<xsl:copy-of select="$header1"/>
|
||||
|
||||
<body xsl:use-attribute-sets="att.body">
|
||||
|
||||
<xsl:copy-of select="$header2"/>
|
||||
|
||||
<p>If you know of any news stories featuring FreeBSD that we have not
|
||||
listed here, please send details to
|
||||
<a href="mailto:doc@freebsd.org">doc@FreeBSD.org</a> so that we can
|
||||
include them.</p>
|
||||
|
||||
<p>You also can visit <a href="{$base}/java/press.html">FreeBSD/Java
|
||||
Press</a> page for information about FreeBSD Java Project's Press
|
||||
News</p>
|
||||
|
||||
<xsl:apply-templates select="//month"/>
|
||||
|
||||
<xsl:copy-of select="$newshome"/>
|
||||
<xsl:copy-of select="$footer"/>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Everything that follows are templates for the rest of the content -->
|
||||
|
||||
<xsl:template match="month">
|
||||
<h1><xsl:value-of select="name"/>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:value-of select="ancestor::year/name"/></h1>
|
||||
|
||||
<ul>
|
||||
<xsl:apply-templates select="descendant::story"/>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="story">
|
||||
<xsl:variable name="url"><xsl:value-of select="url"/></xsl:variable>
|
||||
<xsl:variable name="site-url"><xsl:value-of
|
||||
select="site-url"/></xsl:variable>
|
||||
|
||||
<li>
|
||||
<a>
|
||||
<xsl:attribute name="name">
|
||||
<xsl:call-template name="generate-story-anchor"/>
|
||||
</xsl:attribute>
|
||||
</a>
|
||||
|
||||
<p><a href="{$url}"><b><xsl:value-of
|
||||
select="name"/></b></a><br/>
|
||||
|
||||
<a href="{$site-url}"><xsl:value-of
|
||||
select="site-name"/></a>, <xsl:value-of select="author"/><br/>
|
||||
<xsl:copy-of select="p/child::node()"/>
|
||||
</p>
|
||||
</li>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
Loading…
Reference in a new issue