[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xml-parse-file and text properties
From: |
Richard Stallman |
Subject: |
Re: xml-parse-file and text properties |
Date: |
Thu, 20 Jul 2006 17:46:28 -0400 |
Does this fix it?
*** xml.el 07 Feb 2006 18:16:17 -0500 1.53
--- xml.el 20 Jul 2006 16:24:41 -0400
***************
*** 409,415 ****
(unless (search-forward "]]>" nil t)
(error "XML: (Not Well Formed) CDATA section does not end anywhere in
the document"))
(concat
! (buffer-substring pos (match-beginning 0))
(xml-parse-string))))
;; DTD for the document
((looking-at "<!DOCTYPE")
--- 409,415 ----
(unless (search-forward "]]>" nil t)
(error "XML: (Not Well Formed) CDATA section does not end anywhere in
the document"))
(concat
! (buffer-substring-no-properties pos (match-beginning 0))
(xml-parse-string))))
;; DTD for the document
((looking-at "<!DOCTYPE")
***************
*** 483,489 ****
(nreverse children)))
;; This was an invalid start tag (Expected ">", but didn't see it.)
(error "XML: (Well-Formed) Couldn't parse tag: %s"
! (buffer-substring (- (point) 10) (+ (point) 1)))))))
(t ;; (Not one of PI, CDATA, Comment, End tag, or Start tag)
(unless xml-sub-parser ; Usually, we error out.
(error "XML: (Well-Formed) Invalid character"))
--- 483,490 ----
(nreverse children)))
;; This was an invalid start tag (Expected ">", but didn't see it.)
(error "XML: (Well-Formed) Couldn't parse tag: %s"
! (buffer-substring-no-properties
! (- (point) 10) (+ (point) 1)))))))
(t ;; (Not one of PI, CDATA, Comment, End tag, or Start tag)
(unless xml-sub-parser ; Usually, we error out.
(error "XML: (Well-Formed) Invalid character"))
***************
*** 498,504 ****
(string (progn (if (search-forward "<" nil t)
(forward-char -1)
(goto-char (point-max)))
! (buffer-substring pos (point)))))
;; Clean up the string. As per XML specifications, the XML
;; processor should always pass the whole string to the
;; application. But \r's should be replaced:
--- 499,505 ----
(string (progn (if (search-forward "<" nil t)
(forward-char -1)
(goto-char (point-max)))
! (buffer-substring-no-properties pos (point)))))
;; Clean up the string. As per XML specifications, the XML
;; processor should always pass the whole string to the
;; application. But \r's should be replaced:
Re: xml-parse-file and text properties, Richard Stallman, 2006/07/20