-
Notifications
You must be signed in to change notification settings - Fork 12
/
compile_xhtml1-dtds.sh
44 lines (34 loc) · 1.72 KB
/
compile_xhtml1-dtds.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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