diff options
author | Mark A. Hershberger <mah@everybody.org> | 2004-12-01 04:45:08 +0000 |
---|---|---|
committer | Mark A. Hershberger <mah@everybody.org> | 2004-12-01 04:45:08 +0000 |
commit | ae0261106903fdd8e1aefe92549d4d88e521e6e6 (patch) | |
tree | 9f4b49adff90719bead58aa6fe85caa12fc171af /lisp/xml.el | |
parent | 034a48f4d34a43f7599b71369c561227767304f9 (diff) | |
download | emacs-ae0261106903fdd8e1aefe92549d4d88e521e6e6.tar.gz emacs-ae0261106903fdd8e1aefe92549d4d88e521e6e6.tar.bz2 emacs-ae0261106903fdd8e1aefe92549d4d88e521e6e6.zip |
2004-11-30 Mark A. Hershberger <mah@everybody.org>
* xml.el (xml-substitute-special): Fix validity error messages to
actually show the unexpandable entity. Added validity error if &
isn't followed by an entity.
(xml-parse-tag): Concatnate any string following the a
<![CDATA[]]> section to the parsed CDATA.
Diffstat (limited to 'lisp/xml.el')
-rw-r--r-- | lisp/xml.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lisp/xml.el b/lisp/xml.el index b0d5d45f98d..ec048a440bd 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -371,7 +371,9 @@ Returns one of: (let ((pos (match-end 0))) (unless (search-forward "]]>" nil t) (error "XML: (Not Well Formed) CDATA section does not end anywhere in the document")) - (buffer-substring pos (match-beginning 0)))) + (concat + (buffer-substring pos (match-beginning 0)) + (xml-parse-string)))) ;; DTD for the document ((looking-at "<!DOCTYPE") (let ((dtd (xml-parse-dtd parse-ns))) @@ -703,7 +705,7 @@ This follows the rule [28] in the XML specifications." (let ((point 0) children end-point) - (while (string-match "&\\([^;]+\\);" string point) + (while (string-match "&\\([^;]*\\);" string point) (setq end-point (match-end 0)) (let* ((this-part (match-string 1 string)) (prev-part (substring string point (match-beginning 0))) @@ -721,10 +723,12 @@ This follows the rule [28] in the XML specifications." (if c (string c)))) (entity (cdr entity)) + ((eq (length this-part) 0) + (error "XML: (Validity) No entity given")) (t (if xml-validating-parser (error "XML: (Validity) Undefined entity `%s'" - (match-string 1 this-part))))))) + this-part)))))) (cond ((null children) ;; FIXME: If we have an entity that expands into XML, this won't work. |