aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/xml.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/xml.el')
-rw-r--r--lisp/xml.el23
1 files changed, 11 insertions, 12 deletions
diff --git a/lisp/xml.el b/lisp/xml.el
index 993ef59b276..b0d5d45f98d 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -598,8 +598,8 @@ This follows the rule [28] in the XML specifications."
598 nil) 598 nil)
599 (t 599 (t
600 (if xml-validating-parser 600 (if xml-validating-parser
601 error "XML: (Validity) Invalid element type in the DTD"))) 601 (error "XML: (Validity) Invalid element type in the DTD"))))
602 602
603 ;; rule [45]: the element declaration must be unique 603 ;; rule [45]: the element declaration must be unique
604 (if (and (assoc element dtd) 604 (if (and (assoc element dtd)
605 xml-validating-parser) 605 xml-validating-parser)
@@ -727,14 +727,9 @@ This follows the rule [28] in the XML specifications."
727 (match-string 1 this-part))))))) 727 (match-string 1 this-part)))))))
728 728
729 (cond ((null children) 729 (cond ((null children)
730 (if (stringp expansion) 730 ;; FIXME: If we have an entity that expands into XML, this won't work.
731 (setq children (concat prev-part expansion)) 731 (setq children
732 (if (stringp (car (last expansion))) 732 (concat prev-part expansion)))
733 (progn
734 (setq children
735 (list (concat prev-part (car expansion))
736 (cdr expansion))))
737 (setq children (append expansion prev-part)))))
738 ((stringp children) 733 ((stringp children)
739 (if (stringp expansion) 734 (if (stringp expansion)
740 (setq children (concat children prev-part expansion)) 735 (setq children (concat children prev-part expansion))
@@ -756,11 +751,15 @@ This follows the rule [28] in the XML specifications."
756 (cond ((stringp children) 751 (cond ((stringp children)
757 (concat children (substring string point))) 752 (concat children (substring string point)))
758 ((stringp (car (last children))) 753 ((stringp (car (last children)))
759 (concat (car children) (substring string point))) 754 (concat (car (last children)) (substring string point)))
760 ((null children) 755 ((null children)
761 string) 756 string)
762 (t 757 (t
763 (nreverse children))))) 758 (concat (mapconcat 'identity
759 (nreverse children)
760 "")
761 (substring string point))))))
762
764;;******************************************************************* 763;;*******************************************************************
765;;** 764;;**
766;;** Printing a tree. 765;;** Printing a tree.