- Generate translated rss.xml.
(new) -> 1.3 www/ja/share/sgml/templates.news-rss.xsl www/ja/news/Makefile - The link to the newsflash rss feed is changed to the translated feed. www/ja/index.xsl
This commit is contained in:
parent
f184bbc645
commit
566ce7528c
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=36678
3 changed files with 107 additions and 4 deletions
|
@ -4,7 +4,7 @@
|
|||
<!ENTITY title "The FreeBSD Project">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD: www/ja/index.xsl,v 1.56 2010/05/11 15:42:22 ryusuke Exp $ -->
|
||||
<!-- $FreeBSD: www/ja/index.xsl,v 1.57 2010/05/12 13:21:39 ryusuke Exp $ -->
|
||||
<!-- Original revision: 1.169 -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
|
@ -241,7 +241,7 @@
|
|||
<a href="&base;/news/newsflash.html" title="すべてのニュース">すべてのニュース</a>
|
||||
</li>
|
||||
<li class="last-child">
|
||||
<a href="&enbase;/news/rss.xml" title="ニュースの RSS フィード"><img class="rssimage" src="&enbase;/layout/images/ico_rss.png" width="27" height="12" alt="News RSS Feed" /></a>
|
||||
<a href="&base;/news/rss.xml" title="ニュースの RSS フィード"><img class="rssimage" src="&enbase;/layout/images/ico_rss.png" width="27" height="12" alt="News RSS Feed" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div> <!-- unnamed -->
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/ja/news/Makefile,v 1.38 2010/04/23 22:52:29 ryusuke Exp $
|
||||
# $FreeBSD: www/ja/news/Makefile,v 1.39 2010/06/04 17:35:53 ryusuke Exp $
|
||||
# The FreeBSD Japanese Documentation Project
|
||||
# Original revision: 1.38
|
||||
|
||||
|
@ -30,7 +30,7 @@ DEPENDSET.DEFAULT= transtable news press
|
|||
|
||||
XMLDOCS= newsflash:${XSL_NEWS_NEWSFLASH}:${XML_NEWS_NEWS_MASTER}:
|
||||
XMLDOCS+= news-rdf:${XSL_NEWS_NEWS_RDF}:${XML_NEWS_NEWS_MASTER}:news.rdf
|
||||
XMLDOCS+= news-rss:${XSL_NEWS_NEWS_RSS}:${XML_NEWS_NEWS_MASTER}:rss.xml
|
||||
XMLDOCS+= news-rss:../share/sgml/templates.news-rss.xsl:../share/sgml/news.xml:rss.xml
|
||||
XMLDOCS+= press:${XSL_NEWS_PRESS}:${XML_NEWS_PRESS_MASTER}:
|
||||
XMLDOCS+= press-rss:${XSL_NEWS_PRESS_RSS}:${XML_NEWS_PRESS_MASTER}:press-rss.xml
|
||||
|
||||
|
|
103
ja/share/sgml/templates.news-rss.xsl
Normal file
103
ja/share/sgml/templates.news-rss.xsl
Normal file
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="EUC-JP" ?>
|
||||
<!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 News Flash">
|
||||
<!ENTITY link "http://www.FreeBSD.org/ja/news/">
|
||||
<!ENTITY email "freebsd-www">
|
||||
<!ENTITY realname "Webmaster Team">
|
||||
]>
|
||||
|
||||
<!-- $FreeBSD$ -->
|
||||
<!-- The FreeBSD Japanese Documentation Project -->
|
||||
<!-- Original revision: 1.3 -->
|
||||
|
||||
<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" indent="yes" encoding="&xml.encoding;"/>
|
||||
|
||||
<xsl:variable name="date">
|
||||
<xsl:value-of select="//cvs:keyword[@name='freebsd']"/>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Generate the main body of the RDF file -->
|
||||
<xsl:template match="news">
|
||||
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
|
||||
<channel>
|
||||
<title>&title;</title>
|
||||
<link>&link;</link>
|
||||
<description>FreeBSD プロジェクトの最新ニュース</description>
|
||||
<language>ja-jp</language>
|
||||
<webMaster>&email;@FreeBSD.org (&realname;)</webMaster>
|
||||
<managingEditor>&email;@FreeBSD.org (&realname;)</managingEditor>
|
||||
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
||||
<ttl>120</ttl>
|
||||
<image>
|
||||
<url>http://www.FreeBSD.org/logo/logo-full.png</url>
|
||||
<title>&title;</title>
|
||||
<link>&link;</link>
|
||||
</image>
|
||||
<atom:link href="&link;rss.xml" rel="self" type="application/rss+xml" />
|
||||
<!-- Only include the last 10 events -->
|
||||
<xsl:apply-templates select="descendant::event[position() <= 10]"/>
|
||||
|
||||
</channel>
|
||||
</rss>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Generate the <item> elements and their content -->
|
||||
<xsl:template match="event">
|
||||
<xsl:param name="year" select="../../../name" />
|
||||
<xsl:param name="month" select="../../name" />
|
||||
<xsl:param name="day" select="../name" />
|
||||
<xsl:param name="this" select="." />
|
||||
<xsl:param name="pos">
|
||||
<xsl:for-each select="../event">
|
||||
<xsl:if test=". = $this">
|
||||
<xsl:value-of select="position()" />
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:variable name="link">
|
||||
<xsl:text>http://www.FreeBSD.org/ja/news/newsflash.html#</xsl:text>
|
||||
<xsl:call-template name="html-news-generate-anchor">
|
||||
<xsl:with-param name="label" select="'event'" />
|
||||
<xsl:with-param name="year" select="$year" />
|
||||
<xsl:with-param name="month" select="$month" />
|
||||
<xsl:with-param name="day" select="$day" />
|
||||
<xsl:with-param name="pos" select="$pos" />
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<item>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(child::title)">
|
||||
<title><xsl:value-of select="normalize-space(title)"/></title>
|
||||
<description><xsl:value-of select="normalize-space(p)"/></description>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<title><xsl:value-of select="normalize-space(p)"/></title>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<link><xsl:value-of select="normalize-space($link)"/></link>
|
||||
<guid><xsl:value-of select="normalize-space($link)"/></guid>
|
||||
|
||||
<pubDate>
|
||||
<xsl:call-template name="misc-format-date-string">
|
||||
<xsl:with-param name="year" select="$year" />
|
||||
<xsl:with-param name="month" select="$month" />
|
||||
<xsl:with-param name="day" select="$day" />
|
||||
<xsl:with-param name="date-format" select="$param-l10n-date-format-rfc822" />
|
||||
</xsl:call-template>
|
||||
</pubDate>
|
||||
</item>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="name | date"/>
|
||||
|
||||
</xsl:stylesheet>
|
Loading…
Reference in a new issue