Permalink
Browse files

Add script to download the install XHTML 1.0 DTDs

This allows to regenerate the libvirt documentation.

Script provided by Justin Clift.
  • Loading branch information...
1 parent b19fde5 commit 0de1f695b3ba168e60bb58ce79e82e1e89d3a381 @photron committed Jul 29, 2011
Showing with 46 additions and 0 deletions.
  1. +44 −0 compile_xhtml1-dtds.sh
  2. +2 −0 msys_setup.bat
@@ -0,0 +1,44 @@
+#!/bin/sh -ex
+
+. utilslib.sh
+
+basedir=/src/xhtml1-dtds
+url=http://www.w3.org/TR/xhtml1/
+version=2
+tarball=xhtml1.tgz
+directory=xhtml1-20020801
+xhtml1_dir=/usr/share/xml/xhtml/1.0
+
+mkdir -p $basedir
+pushd $basedir
+
+utilslib_download $url $tarball
+
+if [ ! -d $directory ]
+then
+ echo unpacking $tarball ...
+ tar -xvf $tarball
+fi
+
+
+# Create the target dir and move the DTD files there
+mkdir -p $xhtml1_dir
+cp xhtml1-20020801/DTD/* $xhtml1_dir
+
+# Create the XML catalog file
+mkdir -p /etc/xml/
+xmlcatalog --noout --create /etc/xml/catalog
+
+# Creating entries in the XML catalog file
+xmlcatalog --noout -add public '-//W3C//DTD XHTML 1.0 Strict//EN' "$xhtml1_dir/xhtml1-strict.dtd" /etc/xml/catalog
+xmlcatalog --noout -add public '-//W3C//DTD XHTML 1.0 Transitional//EN' "$xhtml1_dir/xhtml1-transitional.dtd" /etc/xml/catalog
+xmlcatalog --noout -add public '-//W3C//DTD XHTML 1.0 Frameset//EN' "$xhtml1_dir/xhtml1-frameset.dtd" /etc/xml/catalog
+xmlcatalog --noout -add public '-//W3C//ENTITIES Latin 1 for XHTML//EN' "$xhtml1_dir/xhtml-lat1.ent" /etc/xml/catalog
+xmlcatalog --noout -add public '-//W3C//ENTITIES Special for XHTML//EN' "$xhtml1_dir/xhtml-special.ent" /etc/xml/catalog
+xmlcatalog --noout -add public '-//W3C//ENTITIES Symbols for XHTML//EN' "$xhtml1_dir/xhtml-symbol.ent" /etc/xml/catalog
+xmlcatalog --noout -add rewriteSystem 'http://www.w3.org/TR/xhtml1/DTD/' "$xhtml1_dir/" /etc/xml/catalog
+xmlcatalog --noout -add rewriteSystem 'http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/' "$xhtml1_dir/" /etc/xml/catalog
+xmlcatalog --noout -add rewriteURI 'http://www.w3.org/TR/xhtml1/DTD/' "$xhtml1_dir/" /etc/xml/catalog
+xmlcatalog --noout -add rewriteURI 'http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/' "$xhtml1_dir/" /etc/xml/catalog
+
+popd
View
@@ -519,6 +519,8 @@ if %install_libvirt_scripts% NEQ yes goto skip_libvirt_scripts
call %tmp%\install_file.bat %base_dir%\utilslib.sh %msys_dir%\bin\utilslib.sh
+call %tmp%\install_file.bat %base_dir%\compile_xhtml1-dtds.sh %msys_dir%\bin\compile_xhtml1-dtds.sh
+
call %tmp%\install_file.bat %base_dir%\compile_portablexdr.sh %msys_dir%\bin\compile_portablexdr.sh
call %tmp%\install_patch.bat portablexdr-4.9.1-mingw.patch

0 comments on commit 0de1f69

Please sign in to comment.