People with cool browsers can now browse xml files directly.
git-svn-id: svn://svn.c3d2.de/c3d2-web/branches/toidinamais_coole_scheisse@106 31f61c52-7bfb-0310-b897-fc00f8a278f0
This commit is contained in:
parent
8823ec1d16
commit
4d42847a77
24
Makefile
24
Makefile
|
@ -36,13 +36,14 @@ CONTENT=$(PAGES) $(DS_PAGES) $(NEWSFILES)
|
||||||
|
|
||||||
PAGES:=$(patsubst content/%.xml, www/%.html, $(filter-out $(NAVIGATION) $(SKELETONS), $(wildcard content/*.xml)))
|
PAGES:=$(patsubst content/%.xml, www/%.html, $(filter-out $(NAVIGATION) $(SKELETONS), $(wildcard content/*.xml)))
|
||||||
DS_PAGES:=$(patsubst content/datenspuren/%.xml, www/datenspuren/%.html, $(wildcard content/datenspuren/*.xml))
|
DS_PAGES:=$(patsubst content/datenspuren/%.xml, www/datenspuren/%.html, $(wildcard content/datenspuren/*.xml))
|
||||||
NEWSITEMS:=$(wildcard content/news/*.xml)
|
NEWSINDEX:=content/news/index.xml
|
||||||
|
NEWSITEMS:=$(filter-out $(NEWSINDEX), $(wildcard content/news/*.xml))
|
||||||
NEWSFILES:=www/news.html www/news-rss.xml www/news-atom.xml
|
NEWSFILES:=www/news.html www/news-rss.xml www/news-atom.xml
|
||||||
DTD:=dtd/c3d2web.dtd
|
DTD:=dtd/c3d2web.dtd
|
||||||
CLEAN=$(CONTENT) $(NEWSFILES)
|
CLEAN=$(CONTENT) $(NEWSFILES)
|
||||||
|
|
||||||
### Defaults ###
|
### Defaults ###
|
||||||
.PHONY: export contents clean mrproper all install check
|
.PHONY: export contents clean mrproper all install check mirrorcontent
|
||||||
.PRECIOUS: content/%.xml www/%.html content/datenspuren/%.xml www/datenspuren/%.html
|
.PRECIOUS: content/%.xml www/%.html content/datenspuren/%.xml www/datenspuren/%.html
|
||||||
.SILENT: check
|
.SILENT: check
|
||||||
|
|
||||||
|
@ -53,7 +54,8 @@ install: export
|
||||||
contents: $(CONTENT) $(DTD)
|
contents: $(CONTENT) $(DTD)
|
||||||
|
|
||||||
export: contents
|
export: contents
|
||||||
$(RSYNC) $(RSYNC_FLAGS) --exclude=".svn/" www/ $(DESTDIR)/
|
$(RSYNC) $(RSYNC_FLAGS) --exclude=".svn/" www/ chaosupdates.rdf content dtd xsl $(DESTDIR)/
|
||||||
|
|
||||||
|
|
||||||
check: $(PAGES)
|
check: $(PAGES)
|
||||||
ln -sfn $(PWD)/dtd www/DTD
|
ln -sfn $(PWD)/dtd www/DTD
|
||||||
|
@ -68,20 +70,25 @@ www/news.html: $(STYLE)
|
||||||
www/news-rss.xml: $(STYLE_RSS)
|
www/news-rss.xml: $(STYLE_RSS)
|
||||||
www/news-atom.xml: $(STYLE_ATOM)
|
www/news-atom.xml: $(STYLE_ATOM)
|
||||||
|
|
||||||
$(NEWSFILES): $(NEWSITEMS) $(NAVIGATION)
|
$(NEWSFILES): $(NAVIGATION) $(NEWSINDEX)
|
||||||
|
$(VALIDATOR) $(VFLAGS) $(NEWSINDEX)
|
||||||
|
$(PROCESSOR) $(PFLAGS) -o $@ $(filter-out $(NEWSITEMS) $(NAVIGATION) $(NEWSINDEX),$^) $(NEWSINDEX)
|
||||||
|
|
||||||
|
$(NEWSINDEX): $(NEWSITEMS) Makefile
|
||||||
for item in $(NEWSITEMS) ; do \
|
for item in $(NEWSITEMS) ; do \
|
||||||
$(VALIDATOR) $(VFLAGS) $${item} || exit 1 ; \
|
$(VALIDATOR) $(VFLAGS) $${item} || exit 1 ; \
|
||||||
done
|
done
|
||||||
|
|
||||||
{ echo '<?xml version="1.0" encoding="UTF-8"?>' ; \
|
{ echo '<?xml version="1.0" encoding="UTF-8"?>' ; \
|
||||||
|
echo '<!DOCTYPE page SYSTEM "../../dtd/c3d2web.dtd">' ; \
|
||||||
|
echo '<?xml-stylesheet type="text/xsl" href="../../xsl/html.xsl" ?>' ; \
|
||||||
echo "<page>"; \
|
echo "<page>"; \
|
||||||
echo " <news>"; \
|
echo " <news>"; \
|
||||||
for item in $(NEWSITEMS) ; do \
|
for item in $(patsubst content/news/%,%,$(NEWSITEMS)) ; do \
|
||||||
echo " <newsfile>$${item}</newsfile>"; \
|
echo " <newsfile>$${item}</newsfile>"; \
|
||||||
done; \
|
done; \
|
||||||
echo " </news>"; \
|
echo " </news>"; \
|
||||||
echo "</page>"; } | \
|
echo "</page>"; } > $@
|
||||||
$(PROCESSOR) $(PFLAGS) -o $@ $(filter-out $(NEWSITEMS) $(NAVIGATION),$^) -
|
|
||||||
|
|
||||||
www/datenspuren/%.html: content/datenspuren/%.xml $(DS_STYLE)
|
www/datenspuren/%.html: content/datenspuren/%.xml $(DS_STYLE)
|
||||||
$(VALIDATOR) $(VFLAGS) $<
|
$(VALIDATOR) $(VFLAGS) $<
|
||||||
|
@ -118,7 +125,6 @@ chaosupdates.rdf:
|
||||||
### Mr. Propper ###
|
### Mr. Propper ###
|
||||||
clean:
|
clean:
|
||||||
rm -f $(CLEAN)
|
rm -f $(CLEAN)
|
||||||
rm -rf www/dtd
|
|
||||||
|
|
||||||
mrproper: clean
|
mrproper: clean
|
||||||
rm -f chaosupdates.rdf
|
rm -f chaosupdates.rdf
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
||||||
|
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||||
|
|
||||||
<page title="Impressum">
|
<page title="Impressum">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
||||||
|
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||||
|
|
||||||
<page title="Kontakt" pagetitle="E-Mail">
|
<page title="Kontakt" pagetitle="E-Mail">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
||||||
|
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||||
|
|
||||||
<page title="Mailingliste">
|
<page title="Mailingliste">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
||||||
|
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||||
|
|
||||||
<page pagetitle="Secure Internet Live Conferencing" title="SILC">
|
<page pagetitle="Secure Internet Live Conferencing" title="SILC">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
||||||
|
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||||
|
|
||||||
<page pagetitle="" title="">
|
<page pagetitle="" title="">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
<!DOCTYPE page SYSTEM "../dtd/c3d2web.dtd">
|
||||||
|
<?xml-stylesheet type="text/xsl" href="../xsl/html.xsl" ?>
|
||||||
|
|
||||||
<page title="Wiki" pagetitle="WikiWikiWeb">
|
<page title="Wiki" pagetitle="WikiWikiWeb">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -3,12 +3,15 @@
|
||||||
|
|
||||||
<!ENTITY % Inline "(#PCDATA | link | pre | em | dl )*">
|
<!ENTITY % Inline "(#PCDATA | link | pre | em | dl )*">
|
||||||
|
|
||||||
<!ELEMENT page (p|pre|dl)+>
|
<!ELEMENT page ((news)|(p|pre|dl)+)>
|
||||||
<!ATTLIST page
|
<!ATTLIST page
|
||||||
title CDATA #IMPLIED
|
title CDATA #IMPLIED
|
||||||
pagetitle CDATA #IMPLIED
|
pagetitle CDATA #IMPLIED
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<!ELEMENT news (newsfile)+>
|
||||||
|
<!ELEMENT newsfile (#PCDATA)>
|
||||||
|
|
||||||
<!ELEMENT item ((image)?, (p|pre|dl)+)>
|
<!ELEMENT item ((image)?, (p|pre|dl)+)>
|
||||||
<!ATTLIST item
|
<!ATTLIST item
|
||||||
title CDATA #REQUIRED
|
title CDATA #REQUIRED
|
||||||
|
|
|
@ -57,4 +57,55 @@
|
||||||
<xsl:value-of select="."/>
|
<xsl:value-of select="."/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="navitem">
|
||||||
|
<xsl:param name="file"/>
|
||||||
|
<li>
|
||||||
|
<xsl:element name="a">
|
||||||
|
<xsl:attribute name="href"><xsl:value-of select="$file"/>.html</xsl:attribute>
|
||||||
|
<xsl:if test="document(concat('../content/', $file, '.xml'))/page/@pagetitle">
|
||||||
|
<xsl:attribute name="title"><xsl:value-of select="document(concat('../content/', $file, '.xml'))/page/@pagetitle"/></xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="document(concat('../content/', $file, '.xml'))/page/@title"/>
|
||||||
|
</xsl:element>
|
||||||
|
</li>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="navitems">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="news.html" title="News">News</a>
|
||||||
|
</li>
|
||||||
|
<xsl:for-each select="document('../content/navigation.xml')/navigation/file">
|
||||||
|
<xsl:call-template name="navitem">
|
||||||
|
<xsl:with-param name="file" select="."/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:for-each>
|
||||||
|
</ul>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="chaosupdates">
|
||||||
|
<div id="news">
|
||||||
|
<h2>
|
||||||
|
<xsl:element name="a">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="document('../chaosupdates.rdf')/rdf:RDF/rss:channel/rss:link"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="document('../chaosupdates.rdf')/rdf:RDF/rss:channel/rss:title"/>
|
||||||
|
</xsl:element>
|
||||||
|
</h2>
|
||||||
|
<ul>
|
||||||
|
<xsl:for-each select="document('../chaosupdates.rdf')/rdf:RDF/rss:item[position() < 14]">
|
||||||
|
<li>
|
||||||
|
<xsl:element name="a">
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="rss:link"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="rss:title"/>
|
||||||
|
</xsl:element>
|
||||||
|
</li>
|
||||||
|
</xsl:for-each>
|
||||||
|
</ul>
|
||||||
|
</div> <!-- id="news" -->
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
|
@ -4,6 +4,13 @@
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="xsl rss rdf">
|
xmlns:date="http://exslt.org/dates-and-times" exclude-result-prefixes="xsl rss rdf">
|
||||||
|
|
||||||
|
<xsl:template name="links">
|
||||||
|
<link rel="icon" href="images/favicon.png" type="image/png" />
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="news-rss.xml" />
|
||||||
|
<link rel="alternate" type="application/atom" title="Atom 1.0" href="news-atom.xml" />
|
||||||
|
<link rel="stylesheet" title="Default" type="text/css" href="style/default.css" />
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="header">
|
<xsl:template name="header">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||||
<meta name="description" content="<<</>> c3d2, der Erfahrungsaustauschkreis aus dem sächsischen Dresden" />
|
<meta name="description" content="<<</>> c3d2, der Erfahrungsaustauschkreis aus dem sächsischen Dresden" />
|
||||||
|
@ -23,10 +30,8 @@
|
||||||
<meta name="DC.Coverage" content="Dresden" />
|
<meta name="DC.Coverage" content="Dresden" />
|
||||||
<meta name="DC.Title" content="c3d2: Chaos Computer Club Dresden" />
|
<meta name="DC.Title" content="c3d2: Chaos Computer Club Dresden" />
|
||||||
|
|
||||||
<link rel="icon" href="" type="image/png" />
|
<xsl:call-template name="links" />
|
||||||
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="news-rss.xml" />
|
|
||||||
<link rel="stylesheet" title="Default" type="text/css" href="style/default.css" />
|
|
||||||
|
|
||||||
<title><<</>> Chaos Computer Club Dresden | c3d2</title>
|
<title><<</>> Chaos Computer Club Dresden | c3d2</title>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet version="1.0"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
exclude-result-prefixes="xsl">
|
||||||
|
|
||||||
|
<xsl:import href="xhtml.xsl" />
|
||||||
|
|
||||||
|
<xsl:template name="links">
|
||||||
|
<link rel="icon" type="image/png" href="../images/favicon.png" />
|
||||||
|
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="../news-rss.xml" />
|
||||||
|
<link rel="alternate" type="application/atom" title="Atom 1.0" href="../news-atom.xml" />
|
||||||
|
<link rel="stylesheet" title="Default" type="text/css" href="../style/default.css" />
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:output method="html"
|
||||||
|
version="1.0"
|
||||||
|
encoding="utf-8"
|
||||||
|
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
|
doctype-system="DTD/xhtml1-strict.dtd"
|
||||||
|
indent="yes"/>
|
||||||
|
|
||||||
|
<xsl:template name="navitem">
|
||||||
|
<xsl:param name="file"/>
|
||||||
|
<li>
|
||||||
|
<xsl:element name="a">
|
||||||
|
<xsl:attribute name="href"><xsl:value-of select="$file"/>.xml</xsl:attribute>
|
||||||
|
<xsl:if test="document(concat('../content/', $file, '.xml'))/page/@pagetitle">
|
||||||
|
<xsl:attribute name="title"><xsl:value-of select="document(concat('../content/', $file, '.xml'))/page/@pagetitle"/></xsl:attribute>
|
||||||
|
</xsl:if>
|
||||||
|
<xsl:value-of select="document(concat('../content/', $file, '.xml'))/page/@title"/>
|
||||||
|
</xsl:element>
|
||||||
|
</li>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="navitems">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<a href="news.xml" title="News">News</a>
|
||||||
|
</li>
|
||||||
|
<xsl:for-each select="document('../content/navigation.xml')/navigation/file">
|
||||||
|
<xsl:call-template name="navitem">
|
||||||
|
<xsl:with-param name="file" select="."/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:for-each>
|
||||||
|
</ul>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
|
@ -59,14 +59,8 @@
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<ul>
|
<xsl:call-template name="navitems" />
|
||||||
<li>
|
|
||||||
<a href="news.html" title="News">News</a>
|
|
||||||
</li>
|
|
||||||
<xsl:for-each select="document('../content/navigation.xml')/navigation/file">
|
|
||||||
<xsl:call-template name="navitem"><xsl:with-param name="file" select="."/></xsl:call-template>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</div> <!-- id="navigation" -->
|
</div> <!-- id="navigation" -->
|
||||||
|
|
||||||
<!-- ### Content ### -->
|
<!-- ### Content ### -->
|
||||||
|
@ -82,9 +76,6 @@
|
||||||
<xsl:when test="/page/@title">
|
<xsl:when test="/page/@title">
|
||||||
<xsl:value-of select="/page/@title"/>
|
<xsl:value-of select="/page/@title"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="/page/news">
|
|
||||||
<xsl:text>News</xsl:text>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:comment><xsl:text> missing title </xsl:text></xsl:comment>
|
<xsl:comment><xsl:text> missing title </xsl:text></xsl:comment>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
@ -97,28 +88,8 @@
|
||||||
<xsl:comment>
|
<xsl:comment>
|
||||||
<xsl:text> ### News ### </xsl:text>
|
<xsl:text> ### News ### </xsl:text>
|
||||||
</xsl:comment>
|
</xsl:comment>
|
||||||
<div id="news">
|
|
||||||
<h2>
|
<xsl:call-template name="chaosupdates" />
|
||||||
<xsl:element name="a">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="document('../chaosupdates.rdf')/rdf:RDF/rss:channel/rss:link"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="document('../chaosupdates.rdf')/rdf:RDF/rss:channel/rss:title"/>
|
|
||||||
</xsl:element>
|
|
||||||
</h2>
|
|
||||||
<ul>
|
|
||||||
<xsl:for-each select="document('../chaosupdates.rdf')/rdf:RDF/rss:item[position() < 14]">
|
|
||||||
<li>
|
|
||||||
<xsl:element name="a">
|
|
||||||
<xsl:attribute name="href">
|
|
||||||
<xsl:value-of select="rss:link"/>
|
|
||||||
</xsl:attribute>
|
|
||||||
<xsl:value-of select="rss:title"/>
|
|
||||||
</xsl:element>
|
|
||||||
</li>
|
|
||||||
</xsl:for-each>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div> <!-- id="body" -->
|
</div> <!-- id="body" -->
|
||||||
|
|
||||||
|
@ -205,17 +176,4 @@
|
||||||
<!-- Nothing to do here, see above... -->
|
<!-- Nothing to do here, see above... -->
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template name="navitem">
|
|
||||||
<xsl:param name="file"/>
|
|
||||||
<li>
|
|
||||||
<xsl:element name="a">
|
|
||||||
<xsl:attribute name="href"><xsl:value-of select="$file"/>.html</xsl:attribute>
|
|
||||||
<xsl:if test="document(concat('../content/', $file, '.xml'))/page/@pagetitle">
|
|
||||||
<xsl:attribute name="title"><xsl:value-of select="document(concat('../content/', $file, '.xml'))/page/@pagetitle"/></xsl:attribute>
|
|
||||||
</xsl:if>
|
|
||||||
<xsl:value-of select="document(concat('../content/', $file, '.xml'))/page/@title"/>
|
|
||||||
</xsl:element>
|
|
||||||
</li>
|
|
||||||
</xsl:template>
|
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
Loading…
Reference in New Issue