/[emacs]/emacs/lisp/xml.el
ViewVC logotype

Diff of /emacs/lisp/xml.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by hexmode, Thu Oct 7 18:13:43 2004 UTC revision 1.40 by hexmode, Wed Dec 1 04:45:08 2004 UTC
# Line 371  Returns one of: Line 371  Returns one of:
371        (let ((pos (match-end 0)))        (let ((pos (match-end 0)))
372          (unless (search-forward "]]>" nil t)          (unless (search-forward "]]>" nil t)
373            (error "XML: (Not Well Formed) CDATA section does not end anywhere in the document"))            (error "XML: (Not Well Formed) CDATA section does not end anywhere in the document"))
374          (buffer-substring pos (match-beginning 0))))          (concat
375             (buffer-substring pos (match-beginning 0))
376             (xml-parse-string))))
377       ;;  DTD for the document       ;;  DTD for the document
378       ((looking-at "<!DOCTYPE")       ((looking-at "<!DOCTYPE")
379        (let ((dtd (xml-parse-dtd parse-ns)))        (let ((dtd (xml-parse-dtd parse-ns)))
# Line 703  This follows the rule [28] in the XML sp Line 705  This follows the rule [28] in the XML sp
705    
706    (let ((point 0)    (let ((point 0)
707          children end-point)          children end-point)
708      (while (string-match "&\\([^;]+\\);" string point)      (while (string-match "&\\([^;]*\\);" string point)
709        (setq end-point (match-end 0))        (setq end-point (match-end 0))
710        (let* ((this-part (match-string 1 string))        (let* ((this-part (match-string 1 string))
711               (prev-part (substring string point (match-beginning 0)))               (prev-part (substring string point (match-beginning 0)))
# Line 721  This follows the rule [28] in the XML sp Line 723  This follows the rule [28] in the XML sp
723                         (if c (string c))))                         (if c (string c))))
724                      (entity                      (entity
725                       (cdr entity))                       (cdr entity))
726                        ((eq (length this-part) 0)
727                         (error "XML: (Validity) No entity given"))
728                      (t                      (t
729                       (if xml-validating-parser                       (if xml-validating-parser
730                           (error "XML: (Validity) Undefined entity `%s'"                           (error "XML: (Validity) Undefined entity `%s'"
731                                  (match-string 1 this-part)))))))                                  this-part))))))
732    
733          (cond ((null children)          (cond ((null children)
734                 ;; FIXME: If we have an entity that expands into XML, this won't work.                 ;; FIXME: If we have an entity that expands into XML, this won't work.

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26