summaryrefslogtreecommitdiffstats
path: root/Lib/xmllib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-11-18 15:27:20 (GMT)
committerGuido van Rossum <guido@python.org>1997-11-18 15:27:20 (GMT)
commit5d68e8e312fe66450314c9cd49db9bce63cadc42 (patch)
treeb7455bb4b2a33a0b94a19658cfeacbe7922b1342 /Lib/xmllib.py
parenteae121e4360973e9fa197ec798790533da520dc5 (diff)
downloadcpython-5d68e8e312fe66450314c9cd49db9bce63cadc42.zip
cpython-5d68e8e312fe66450314c9cd49db9bce63cadc42.tar.gz
cpython-5d68e8e312fe66450314c9cd49db9bce63cadc42.tar.bz2
Fixed case sensitivity of attributes (they are case *sensitive*).
Diffstat (limited to 'Lib/xmllib.py')
-rw-r--r--Lib/xmllib.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/Lib/xmllib.py b/Lib/xmllib.py
index 38328af..7b2a76a 100644
--- a/Lib/xmllib.py
+++ b/Lib/xmllib.py
@@ -1,5 +1,5 @@
# A parser for XML, using the derived class as static DTD.
-# Author: Sjoerd Mullender
+# Author: Sjoerd Mullender.
import re
import string
@@ -44,14 +44,13 @@ attrfind = re.compile(
# XML parser base class -- find tags and call handler functions.
# Usage: p = XMLParser(); p.feed(data); ...; p.close().
-# The dtd is defined by deriving a class which defines methods
-# with special names to handle tags: start_foo and end_foo to handle
-# <foo> and </foo>, respectively, or do_foo to handle <foo> by itself.
-# (Tags are converted to lower case for this purpose.) The data
-# between tags is passed to the parser by calling self.handle_data()
-# with some data as argument (the data may be split up in arbutrary
-# chunks). Entity references are passed by calling
-# self.handle_entityref() with the entity reference as argument.
+# The dtd is defined by deriving a class which defines methods with
+# special names to handle tags: start_foo and end_foo to handle <foo>
+# and </foo>, respectively. The data between tags is passed to the
+# parser by calling self.handle_data() with some data as argument (the
+# data may be split up in arbutrary chunks). Entity references are
+# passed by calling self.handle_entityref() with the entity reference
+# as argument.
class XMLParser:
@@ -313,8 +312,6 @@ class XMLParser:
attrvalue = attrvalue[1:-1]
else:
self.syntax_error(self.lineno, 'attribute value not quoted')
- # XXXX are attribute names case sensitive?
- attrname = string.lower(attrname)
if attrlist is not None and attrname not in attrlist:
self.syntax_error(self.lineno,
'unknown attribute %s of element %s' %
@@ -565,4 +562,3 @@ def test(args = None):
if __name__ == '__main__':
test()
-