might work

git-svn-id: svn://svn.c3d2.de/c3d2-web/branches/toidinamais_coole_scheisse@72 31f61c52-7bfb-0310-b897-fc00f8a278f0
ds2013
turbo24prg 2005-12-28 19:05:30 +00:00
parent 01269f074f
commit d174aa9c4b
2 changed files with 15 additions and 6 deletions

View File

@ -20,7 +20,7 @@ SKEL:=empty
# Zu verwendendes Skeleton
SKELFILE=content/skel-$(SKEL).xml
# Dateinamen der Inhalte:
CONTENT=$(PAGES) www/news.html #www/news-rss.xml
CONTENT=$(PAGES) www/news.html www/news-rss.xml
PAGES:=$(patsubst content/%.xml, www/%.html, $(filter-out $(NAVIGATION) $(SKELETONS), $(wildcard content/*.xml)))
NEWSITEMS:=$(wildcard content/news/*.xml)
CLEAN:=$(CONTENT) www/news.html www/news-rss.xml chaosupdates.rdf
@ -43,12 +43,19 @@ www/news.html: $(NEWSITEMS) $(STYLE) $(NAVIGATION)
echo " </news>"; \
echo "</page>"; } | $(PROCESSOR) -o $@ $(STYLE) -
www/news-rss.xml: $(NEWSITEMS) $(STYLE_RSS) $(NAVIGATION)
{ echo '<?xml version="1.0" encoding="UTF-8"?>' ; \
echo "<page>"; \
echo " <news>"; \
for item in $^ ; do \
echo " <newsfile>$${item}</newsfile>"; \
done; \
echo " </news>"; \
echo "</page>"; } | $(PROCESSOR) -o $@ $(STYLE_RSS) -
www/%.html: content/%.xml $(STYLE) $(NAVIGATION) chaosupdates.rdf
$(PROCESSOR) -o $@ $(STYLE) $<
www/news-rss.xml: content/news.xml $(STYLE_RSS)
$(PROCESSOR) -o $@ $(STYLE_RSS) $<
### Hilfsregeln zum Editieren ###
edit/%:
@if [ ! -e content/$(@F).xml ] ; then \

View File

@ -8,7 +8,7 @@
encoding="utf-8"
indent="yes"/>
<xsl:template match="/page">
<xsl:template match="news">
<xsl:element name="rss">
<xsl:attribute name="version">2.0</xsl:attribute>
<xsl:attribute name="xml:lang">de</xsl:attribute>
@ -19,7 +19,9 @@
<description>Neues aus dem Chaos Computer Club Dresden</description>
<language>de-de</language>
<pubDate><xsl:value-of select="news/item/@date"/></pubDate>
<xsl:apply-templates/>
<xsl:for-each select="newsfile">
<xsl:apply-templates select="document(current())/item" />
</xsl:for-each>
</channel>
</xsl:element>