You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/04/02 11:09:09 UTC
svn commit: r524753 - in /lenya/trunk/src: modules/news/config/cocoon-xconf/
modules/news/xslt/ modules/news/xslt/rss/ pubs/default/modules/homepage/
pubs/default/modules/homepage/xslt/ pubs/default/resources/shared/css/
Author: andreas
Date: Mon Apr 2 02:09:07 2007
New Revision: 524753
URL: http://svn.apache.org/viewvc?view=rev&rev=524753
Log:
Added RSS link header for newsfeed
Added:
lenya/trunk/src/modules/news/xslt/collection2header.xsl
lenya/trunk/src/modules/news/xslt/rss/
lenya/trunk/src/modules/news/xslt/rss/xhtmllink2rsslink.xsl
Modified:
lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf
lenya/trunk/src/modules/news/xslt/collection2rss.xsl
lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap
lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl
lenya/trunk/src/pubs/default/resources/shared/css/news.css
Modified: lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf?view=diff&rev=524753&r1=524752&r2=524753
==============================================================================
--- lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf (original)
+++ lenya/trunk/src/modules/news/config/cocoon-xconf/resourcetype-news.xconf Mon Apr 2 02:09:07 2007
@@ -31,6 +31,7 @@
<format name="xhtml" uri="cocoon://modules/news/xhtml.xml"/>
<format name="include" uri="cocoon://modules/news/include.xml"/>
<format name="rss" uri="cocoon://modules/news/rss.xml"/>
+ <format name="header" uri="cocoon://modules/news/header.xml"/>
</component-instance>
Added: lenya/trunk/src/modules/news/xslt/collection2header.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2header.xsl?view=auto&rev=524753
==============================================================================
--- lenya/trunk/src/modules/news/xslt/collection2header.xsl (added)
+++ lenya/trunk/src/modules/news/xslt/collection2header.xsl Mon Apr 2 02:09:07 2007
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!-- $Id: xhtml2xhtml.xsl 201776 2005-06-25 18:25:26Z gregor $ -->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:col="http://apache.org/cocoon/lenya/collection/1.0"
+ xmlns:meta="http://apache.org/cocoon/lenya/metadata/1.0"
+ xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+ exclude-result-prefixes="xhtml lenya col meta dc i18n"
+ >
+
+ <xsl:param name="uuid"/>
+
+ <xsl:template match="/col:collection">
+ <link rel="alternate" type="application/rss+xml"
+ title="RSS" href="lenya-document:{$uuid}?uuid2url.extension=rss" />
+ </xsl:template>
+
+</xsl:stylesheet>
Modified: lenya/trunk/src/modules/news/xslt/collection2rss.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/collection2rss.xsl?view=diff&rev=524753&r1=524752&r2=524753
==============================================================================
--- lenya/trunk/src/modules/news/xslt/collection2rss.xsl (original)
+++ lenya/trunk/src/modules/news/xslt/collection2rss.xsl Mon Apr 2 02:09:07 2007
@@ -86,6 +86,8 @@
<description><xsl:value-of select="meta:metadata/dc:elements/dc:description"/></description>
<link><xhtml:a href="lenya-document:{@uuid}"/></link>
<author><xsl:value-of select="meta:metadata/dc:elements/dc:creator"/></author>
+ <xsl:variable name="date" select="meta:metadata/dc:elements/dc:date"/>
+ <pubDate><i18n:date-time src-pattern="yyyy-MM-dd hh:mm:ss" pattern="EEE, d MMM yyyy HH:mm:ss Z" value="{$date}" /></pubDate>
</item>
</xsl:template>
Added: lenya/trunk/src/modules/news/xslt/rss/xhtmllink2rsslink.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/modules/news/xslt/rss/xhtmllink2rsslink.xsl?view=auto&rev=524753
==============================================================================
--- lenya/trunk/src/modules/news/xslt/rss/xhtmllink2rsslink.xsl (added)
+++ lenya/trunk/src/modules/news/xslt/rss/xhtmllink2rsslink.xsl Mon Apr 2 02:09:07 2007
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
+ xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+
+ <xsl:template match="xhtml:a">
+ <xsl:text/>
+ <xsl:value-of select="@href"/>
+ <xsl:text/>
+ </xsl:template>
+
+ <xsl:template match="@*|node()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Modified: lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap?view=diff&rev=524753&r1=524752&r2=524753
==============================================================================
--- lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap (original)
+++ lenya/trunk/src/pubs/default/modules/homepage/sitemap.xmap Mon Apr 2 02:09:07 2007
@@ -38,10 +38,10 @@
</map:match>
</map:match>
- <map:match pattern="news_*.xml">
+ <map:match pattern="news-*_*.xml">
<map:select type="resource-exists">
- <map:when test="site:/{1}/news?format=include">
- <map:generate src="site:/{1}/news?format=include"/>
+ <map:when test="site:/{2}/news?format={1}">
+ <map:generate src="site:/{2}/news?format={1}"/>
</map:when>
<map:otherwise>
<map:generate src="fallback://lenya/content/util/empty.xml"/>
Modified: lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl?view=diff&rev=524753&r1=524752&r2=524753
==============================================================================
--- lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl (original)
+++ lenya/trunk/src/pubs/default/modules/homepage/xslt/homepage2xhtml.xsl Mon Apr 2 02:09:07 2007
@@ -36,13 +36,14 @@
<html>
<head>
<link rel="stylesheet" href="{$contextPath}/{$pubId}/modules/homepage/css/homepage.css" type="text/css"/>
+ <ci:include src="cocoon:/news-header_{$language}.xml"/>
</head>
<body>
<div id="body">
<xsl:if test="$rendertype = 'edit'">
<xsl:attribute name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute>
</xsl:if>
- <ci:include src="cocoon:/news_{$language}.xml"/>
+ <ci:include src="cocoon:/news-include_{$language}.xml"/>
<xsl:apply-templates select="xhtml:body/node()"/>
</div>
</body>
Modified: lenya/trunk/src/pubs/default/resources/shared/css/news.css
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/resources/shared/css/news.css?view=diff&rev=524753&r1=524752&r2=524753
==============================================================================
--- lenya/trunk/src/pubs/default/resources/shared/css/news.css (original)
+++ lenya/trunk/src/pubs/default/resources/shared/css/news.css Mon Apr 2 02:09:07 2007
@@ -41,9 +41,16 @@
div#news h2 {
font-size: small;
margin-top: 10px;
+ border-bottom: none;
+ margin-bottom: 0;
}
-div#news h2 div {
+div#news p {
+ margin-top: 0.3em;
+}
+
+div#news div.newsDate {
+ float: none;
}
div.rsslink {
@@ -53,7 +60,7 @@
border-left: solid 1px #FFFFFF;
border-bottom: solid 1px #666666;
border-right: solid 1px #666666;
- background-color: #FFEEEE;
+ background-color: #DDBBBB;
color: #000000;
padding: 1px 3px 1px 3px;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org