chaosupdates from rdf
atom is broken atm: https://github.com/hukl/cccms/issues/50
This commit is contained in:
parent
4e7c69f638
commit
ecaf9e61a7
2
Makefile
2
Makefile
|
@ -214,7 +214,7 @@ build/%.html.xhtml5-validate: build/%.html
|
|||
### Die neuesten Chaosupdates holen ###
|
||||
$(WWW_CCC_DE_UPDATES).orig: $(DATESTAMP)
|
||||
$(RM) $@
|
||||
$(WGET) -O $@ http://www.ccc.de/en/rss/updates
|
||||
$(WGET) -O $@ http://www.ccc.de/de/rss/updates.rdf
|
||||
|
||||
$(WWW_CCC_DE_UPDATES): $(WWW_CCC_DE_UPDATES).orig
|
||||
$(VALIDATOR) --recover $< > $@
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
<xsl:stylesheet version="1.0"
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:rss="http://purl.org/rss/1.0/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:date="http://exslt.org/dates-and-times"
|
||||
xmlns:str="http://exslt.org/strings"
|
||||
exclude-result-prefixes="xsl atom date str">
|
||||
exclude-result-prefixes="xsl rss rdf date str">
|
||||
|
||||
<xsl:template match="pre">
|
||||
<pre><xsl:apply-templates/></pre>
|
||||
|
@ -163,15 +164,15 @@
|
|||
<xsl:param name="limit" select="5"/>
|
||||
<div id="news">
|
||||
<h2>
|
||||
<a href="{document('../chaosupdates.xml')/atom:feed/atom:link[not(@rel = 'self')]/@href}">
|
||||
<xsl:value-of select="document('../chaosupdates.xml')/atom:feed/atom:title"/>
|
||||
<a href="{document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:link}">
|
||||
<xsl:value-of select="document('../chaosupdates.xml')/rdf:RDF/rss:channel/rss:title"/>
|
||||
</a>
|
||||
</h2>
|
||||
<ul>
|
||||
<xsl:for-each select="document('../chaosupdates.xml')/atom:feed/atom:entry[position() <= $limit]">
|
||||
<xsl:for-each select="document('../chaosupdates.xml')/rdf:RDF/rss:item[position() <= $limit]">
|
||||
<li>
|
||||
<a href="{atom:link[@rel = 'alternate']/@href}">
|
||||
<xsl:value-of select="atom:title"/>
|
||||
<a href="{rss:link}">
|
||||
<xsl:value-of select="rss:title"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
|
|
Loading…
Reference in New Issue