From 4d42847a77f7648958c7b8976a900035b81cc1dd Mon Sep 17 00:00:00 2001 From: toidinamai Date: Wed, 11 Jan 2006 18:12:08 +0000 Subject: [PATCH] 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 --- Makefile | 24 ++++++++++++------- content/impressum.xml | 1 + content/kontakt.xml | 1 + content/mailingliste.xml | 1 + content/silc.xml | 1 + content/skel-empty.xml | 1 + content/wiki.xml | 1 + dtd/c3d2web.dtd | 5 +++- xsl/common.xsl | 51 ++++++++++++++++++++++++++++++++++++++++ xsl/header.xsl | 13 ++++++---- xsl/html.xsl | 49 ++++++++++++++++++++++++++++++++++++++ xsl/xhtml.xsl | 50 ++++----------------------------------- 12 files changed, 138 insertions(+), 60 deletions(-) create mode 100644 xsl/html.xsl diff --git a/Makefile b/Makefile index 64043530b..af818a7b4 100644 --- a/Makefile +++ b/Makefile @@ -36,13 +36,14 @@ CONTENT=$(PAGES) $(DS_PAGES) $(NEWSFILES) 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)) -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 DTD:=dtd/c3d2web.dtd CLEAN=$(CONTENT) $(NEWSFILES) ### 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 .SILENT: check @@ -53,7 +54,8 @@ install: export contents: $(CONTENT) $(DTD) export: contents - $(RSYNC) $(RSYNC_FLAGS) --exclude=".svn/" www/ $(DESTDIR)/ + $(RSYNC) $(RSYNC_FLAGS) --exclude=".svn/" www/ chaosupdates.rdf content dtd xsl $(DESTDIR)/ + check: $(PAGES) ln -sfn $(PWD)/dtd www/DTD @@ -68,20 +70,25 @@ www/news.html: $(STYLE) www/news-rss.xml: $(STYLE_RSS) 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 \ $(VALIDATOR) $(VFLAGS) $${item} || exit 1 ; \ done - + { echo '' ; \ + echo '' ; \ + echo '' ; \ echo ""; \ echo " "; \ - for item in $(NEWSITEMS) ; do \ + for item in $(patsubst content/news/%,%,$(NEWSITEMS)) ; do \ echo " $${item}"; \ done; \ echo " "; \ - echo ""; } | \ - $(PROCESSOR) $(PFLAGS) -o $@ $(filter-out $(NEWSITEMS) $(NAVIGATION),$^) - + echo ""; } > $@ www/datenspuren/%.html: content/datenspuren/%.xml $(DS_STYLE) $(VALIDATOR) $(VFLAGS) $< @@ -118,7 +125,6 @@ chaosupdates.rdf: ### Mr. Propper ### clean: rm -f $(CLEAN) - rm -rf www/dtd mrproper: clean rm -f chaosupdates.rdf diff --git a/content/impressum.xml b/content/impressum.xml index b113fa491..ae8da3e3c 100644 --- a/content/impressum.xml +++ b/content/impressum.xml @@ -1,5 +1,6 @@ +

diff --git a/content/kontakt.xml b/content/kontakt.xml index b44deeb5d..e545a48b1 100644 --- a/content/kontakt.xml +++ b/content/kontakt.xml @@ -1,5 +1,6 @@ +

diff --git a/content/mailingliste.xml b/content/mailingliste.xml index 431498c70..078d27f60 100644 --- a/content/mailingliste.xml +++ b/content/mailingliste.xml @@ -1,5 +1,6 @@ +

diff --git a/content/silc.xml b/content/silc.xml index a6f810064..f79d2b7fc 100644 --- a/content/silc.xml +++ b/content/silc.xml @@ -1,5 +1,6 @@ +

diff --git a/content/skel-empty.xml b/content/skel-empty.xml index b5ddb4197..a6c0a0b7b 100644 --- a/content/skel-empty.xml +++ b/content/skel-empty.xml @@ -1,5 +1,6 @@ +

diff --git a/content/wiki.xml b/content/wiki.xml index f9fa9aa3a..1c59a8a9b 100644 --- a/content/wiki.xml +++ b/content/wiki.xml @@ -1,5 +1,6 @@ +

diff --git a/dtd/c3d2web.dtd b/dtd/c3d2web.dtd index 94e0b83a4..d049dba56 100644 --- a/dtd/c3d2web.dtd +++ b/dtd/c3d2web.dtd @@ -3,12 +3,15 @@ - + + + + + + +

  • + + .html + + + + + +
  • + + + +
      +
    • + News +
    • + + + + + +
    +
    + + +
    +

    + + + + + + +

    +
      + +
    • + + + + + + +
    • +
      +
    +
    +
    + diff --git a/xsl/header.xsl b/xsl/header.xsl index a8f8a3340..3494fe6bf 100644 --- a/xsl/header.xsl +++ b/xsl/header.xsl @@ -4,6 +4,13 @@ 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"> + + + + + + + @@ -23,10 +30,8 @@ - - - - + + <<</>> Chaos Computer Club Dresden | c3d2 diff --git a/xsl/html.xsl b/xsl/html.xsl new file mode 100644 index 000000000..d35d05d8a --- /dev/null +++ b/xsl/html.xsl @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + +
  • + + .xml + + + + + +
  • +
    + + +
      +
    • + News +
    • + + + + + +
    +
    + +
    diff --git a/xsl/xhtml.xsl b/xsl/xhtml.xsl index 0cbcc4090..ccb54a8dc 100644 --- a/xsl/xhtml.xsl +++ b/xsl/xhtml.xsl @@ -59,14 +59,8 @@

    - + + @@ -82,9 +76,6 @@ - - News - missing title @@ -97,28 +88,8 @@ ### News ### -
    -

    - - - - - - -

    -
      - -
    • - - - - - - -
    • -
      -
    -
    + + @@ -205,17 +176,4 @@ - - -
  • - - .html - - - - - -
  • -
    -