diff -up ./src/chameleon/core/utils.py.orig ./src/chameleon/core/utils.py --- ./src/chameleon/core/utils.py.orig 2011-02-02 17:07:32.530262435 -0500 +++ ./src/chameleon/core/utils.py 2011-02-02 17:08:13.160988253 -0500 @@ -16,6 +16,12 @@ except ImportError: def adapts(*interfaces): pass +try: + from xml.etree.ElementTree import ParseError +except ImportError: + class ParseError(object): + pass + import sys import interfaces import htmlentitydefs @@ -137,7 +143,7 @@ def validate(string): try: import_elementtree().fromstring(validation_string) - except xml.parsers.expat.ExpatError: + except (xml.parsers.expat.ExpatError, ParseError): raise ValidationError(string) def elements_with_attribute(element, ns, name, value=None):