html5 validation
This commit is contained in:
parent
f92bed5dbb
commit
51f07b8e90
16
Makefile
16
Makefile
|
@ -31,7 +31,7 @@ DESTDIR?=www-export
|
||||||
### Ressourcen ###
|
### Ressourcen ###
|
||||||
# XSLT-Stylesheets:
|
# XSLT-Stylesheets:
|
||||||
STYLE=xsl/html5.xsl
|
STYLE=xsl/html5.xsl
|
||||||
DS_STYLE=xsl/datenspuren/html5.xsl
|
DS_STYLE=xsl/datenspuren/xhtml.xsl
|
||||||
# Document-Type-Definition:
|
# Document-Type-Definition:
|
||||||
DTD:=dtd/c3d2web.dtd
|
DTD:=dtd/c3d2web.dtd
|
||||||
# XML-Katalog (Pfad zu den DTDs) - wird benötigt vom Validator
|
# XML-Katalog (Pfad zu den DTDs) - wird benötigt vom Validator
|
||||||
|
@ -95,12 +95,6 @@ $(DATESTAMP):
|
||||||
$(RM) $(wildcard build/.stamp-*)
|
$(RM) $(wildcard build/.stamp-*)
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
.PHONY: html5-validate
|
|
||||||
html5-validate: www
|
|
||||||
for file in `find $< -name *.html`; do \
|
|
||||||
curl -d @$file< -H "Content-Type: text/html; charset=UTF-8" 'http://validator.nu/?out=text&preset=http://s.validator.nu/xhtml5-aria-rdf-svg-mathml.rnc+http://s.validator.nu/html5/assertions.sch+http://c.validator.nu/all/' \
|
|
||||||
done
|
|
||||||
|
|
||||||
### Regeln für den XSLT-Prozess ###
|
### Regeln für den XSLT-Prozess ###
|
||||||
|
|
||||||
build/%.html : NOVALID:=true
|
build/%.html : NOVALID:=true
|
||||||
|
@ -207,6 +201,14 @@ build/datenspuren/news-atom.xml : NOVALID:=true
|
||||||
build/datenspuren/news-atom.xml : PFLAGS+=--stringparam prefix ds09-
|
build/datenspuren/news-atom.xml : PFLAGS+=--stringparam prefix ds09-
|
||||||
build/datenspuren/news-atom.xml : VFLAGS_OUT=$(VFLAGS) --relaxng xsd/atom.rng
|
build/datenspuren/news-atom.xml : VFLAGS_OUT=$(VFLAGS) --relaxng xsd/atom.rng
|
||||||
|
|
||||||
|
.PHONY: html5-validate
|
||||||
|
html5-validate: $(patsubst build/%.html, build/%.html.html5-validate, $(CONTENT))
|
||||||
|
.PHONY: build/%.html.html5-validate
|
||||||
|
build/%.html.html5-validate: build/%.html
|
||||||
|
./scripts/validate_xhtml5.sh $<
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Die neuesten Chaosupdates holen ###
|
### Die neuesten Chaosupdates holen ###
|
||||||
$(WWW_CCC_DE_UPDATES).orig: $(DATESTAMP)
|
$(WWW_CCC_DE_UPDATES).orig: $(DATESTAMP)
|
||||||
$(RM) $@
|
$(RM) $@
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
text=$(curl -s -d @$1 -H "Content-Type: application/xhtml+xml; charset=UTF-8" 'http://validator.nu/?out=text&preset=http://s.validator.nu/xhtml5-aria-rdf-svg-mathml.rnc+http://s.validator.nu/html5/assertions.sch+http://c.validator.nu/all/')
|
||||||
|
|
||||||
|
if [ -n "$(echo "$text"|grep "The document validates according to the specified schema(s).")" ]; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "=== $1 ==="
|
||||||
|
echo "$text"
|
||||||
|
exit 0 #1
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue