Commit d468bd34 authored by Guido van Rossum's avatar Guido van Rossum

Sjoerd Mullender:

These two fixes were approved by me.

Peter Kropf:
There's a problem with the xmllib module when used with JPython. Specifically,
the JPython re module has trouble with the () characters in strings passed into
re.compile.

Spiros Papadimitriou:
I just downloaded xmllib.py ver. 0.3 from python.org and there
seems to be a slight typo:  Line 654 ("tag = self.stack[-1][0]"
in parse_endtag),  is indented one level more than it should be.
I just thought I'd let you know...
parent 7c6395a6
......@@ -27,7 +27,7 @@ newline = re.compile('\n')
attrfind = re.compile(
_S + '(?P<name>' + _Name + ')'
'(' + _opS + '=' + _opS +
'(?P<value>'+_QStr+'|[-a-zA-Z0-9.:+*%?!()_#=~]+))?')
'(?P<value>'+_QStr+'|[-a-zA-Z0-9.:+*%?!\(\)_#=~]+))?')
starttagopen = re.compile('<' + _Name)
starttagend = re.compile(_opS + '(?P<slash>/?)>')
starttagmatch = re.compile('<(?P<tagname>'+_Name+')'
......@@ -43,8 +43,8 @@ cdataclose = re.compile(r'\]\]>')
# SYSTEM SystemLiteral
# PUBLIC PubidLiteral SystemLiteral
_SystemLiteral = '(?P<%s>'+_QStr+')'
_PublicLiteral = '(?P<%s>"[-\'()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
"'[-()+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
_PublicLiteral = '(?P<%s>"[-\'\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*"|' \
"'[-\(\)+,./:=?;!*#@$_%% \n\ra-zA-Z0-9]*')"
_ExternalId = '(?:SYSTEM|' \
'PUBLIC'+_S+_PublicLiteral%'pubid'+ \
')'+_S+_SystemLiteral%'syslit'
......@@ -652,7 +652,7 @@ class XMLParser:
return i+1
if not self.__accept_missing_endtag_name:
self.syntax_error('no name specified in end tag')
tag = self.stack[-1][0]
tag = self.stack[-1][0]
k = i+2
else:
tag = res.group(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment