* lisp/xml.el: Handle entity and character reference expansion correctly.
commita7aef6f5c6e22b167ea0234ab84c0308201d681b
authorChong Yidong <cyd@gnu.org>
Mon, 2 Jul 2012 16:21:54 +0000 (3 00:21 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 2 Jul 2012 16:21:54 +0000 (3 00:21 +0800)
treefd09ca2bd61cdc2e8b8e222b73578c669fa2e354
parent2b5208f18115bd0f364c11cbdc8124878158927a
* lisp/xml.el: Handle entity and character reference expansion correctly.
(xml-default-ns): New variable.
(xml-entity-alist): Use XML spec definitions for lt and amp.
(xml-parse-region): Make first two arguments optional.  Discard
text properties.
(xml-parse-tag-1): New function, spun off from xml-parse-tag.  All
callers changed.
(xml-parse-tag): Call xml-parse-tag-1.  For backward
compatibility, this function should not modify buffer contents.
(xml-parse-tag-1): Fix opening-tag regexp.
(xml-parse-string): Rewrite, handling entity and character
references properly.
(xml--entity-replacement-text): Signal an error if a parameter
entity is undefined.

* test/automated/xml-parse-tests.el (xml-parse-tests--data): More
testcases.
lisp/ChangeLog
lisp/xml.el
test/ChangeLog
test/automated/xml-parse-tests.el