build script: XML XSD validation during build
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 13 Aug 2013 17:11:12 +0200
changeset 5700aecef99f14
parent 56 8e94547457f3
child 58 6dde411ca82c
build script: XML XSD validation during build
build.sh
     1.1 --- a/build.sh	Tue Aug 13 17:02:03 2013 +0200
     1.2 +++ b/build.sh	Tue Aug 13 17:11:12 2013 +0200
     1.3 @@ -38,6 +38,7 @@
     1.4  pushd `dirname $0`/$GENERATOR_DIR
     1.5  
     1.6  hg status ../../data/dictionary.xml | grep -q "^M" && echo -e "\033[31mWARNING: building from data file which was not commited into Mercurial!\033[0m" || (echo -e "\033[32mINFO: building from versioned data file: `hg identify` \033[0m");
     1.7 +xmllint --noout --schema ../../data/dictionary.xsd ../../data/dictionary.xml &> /dev/null && echo -e "\033[32mINFO: XML is valid according to XSD\033[0m" || (echo -e "\033[31mERROR: XML is invalid according to XSD\033[0m");
     1.8  
     1.9  # build the generator if needed
    1.10  if [ ! -f $JAR ]; then