From fca59bea770346cf1c1f9b0e00cb48a61b44a8f3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 25 Oct 2015 21:00:20 +0100 Subject: import of old now defunct presentation slides svn repo --- 2005/flow-accounting-lt2005/ltpdk/bin/lt-validate | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 2005/flow-accounting-lt2005/ltpdk/bin/lt-validate (limited to '2005/flow-accounting-lt2005/ltpdk/bin/lt-validate') diff --git a/2005/flow-accounting-lt2005/ltpdk/bin/lt-validate b/2005/flow-accounting-lt2005/ltpdk/bin/lt-validate new file mode 100755 index 0000000..f56bdbe --- /dev/null +++ b/2005/flow-accounting-lt2005/ltpdk/bin/lt-validate @@ -0,0 +1,38 @@ +#!/bin/sh +# +# lt-validate - validates an XML/DocBook document of LinuxTag flavour. +# +# LinuxTag Paper Development Kit is Copyright (C) 2003 by LinuxTag e. V. +# +# V1.2 written 2003-05-04 by Nils Magnus (magnus@linuxtag.org) +# + +# check options +if [ -z "$1" ] +then + cat << EOF +Usage: $0 file +Validates XML/DocBook file. +EOF + exit 1 +fi + +# determine paths + +bin=`echo $0 | sed 's/[^/]*$//'` + +if echo ${bin} | grep -v '^/' > /dev/null +then + bin="`pwd`/${bin}" +fi + +xml=`echo ${bin} | sed 's/bin.*$/xml/'` + +# call xmllint + +if ${bin}/xmllint --dtdvalid ${xml}/docbook.dtd $* +then + echo "Document is conforming to spec. You may want to check the results with lt-convert." +else + echo "Summary: Document is not conforming to spec." +fi -- cgit v1.2.3