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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
#! /bin/sh -e
# DP: Do not use the default namespace for attributes.
dir=
if [ $# -eq 3 -a "$2" = '-d' ]; then
pdir="-d $3"
dir="$3/"
elif [ $# -ne 1 ]; then
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
exit 1
fi
case "$1" in
-patch)
patch $pdir -f --no-backup-if-mismatch -p0 < $0
#cd ${dir}gcc && autoconf
;;
-unpatch)
patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
#rm ${dir}gcc/configure
;;
*)
echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
exit 1
esac
exit 0
--- Lib/xmllib.py~ 2004-05-03 08:50:00.000000000 +0200
+++ Lib/xmllib.py 2004-05-03 08:53:09.000000000 +0200
@@ -5,6 +5,9 @@
import re
import string
+import warnings
+warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning)
+del warnings
version = '0.3'
@@ -637,20 +640,17 @@
aprefix, key = res.group('prefix', 'local')
if self.__map_case:
key = key.lower()
- if aprefix is None:
- aprefix = ''
- ans = None
- for t, d, nst in self.stack:
- if d.has_key(aprefix):
- ans = d[aprefix]
- if ans is None and aprefix != '':
- ans = self.__namespaces.get(aprefix)
- if ans is not None:
- key = ans + ' ' + key
- elif aprefix != '':
- key = aprefix + ':' + key
- elif ns is not None:
- key = ns + ' ' + key
+ if aprefix is not None:
+ ans = None
+ for t, d, nst in self.stack:
+ if aprefix in d:
+ ans = d[aprefix]
+ if ans is None:
+ ans = self.__namespaces.get(aprefix)
+ if ans is not None:
+ key = ans + ' ' + key
+ else:
+ key = aprefix + ':' + key
nattrdict[key] = val
attrnamemap[key] = okey
attrdict = nattrdict
|