• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:file +defs:type

10 ;; This file is part of GNU Emacs.
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
29 ;; This file contains a somewhat incomplete non-validating XML parser. It
30 ;; parses a file, and returns a list that can be used internally by
35 ;; The document type declaration may either be ignored or (optionally)
37 ;; declarations. The XML file is assumed to be well-formed. In case
38 ;; of error, the parsing stops and the XML file is shown where the
43 ;; The XML file should have the following format:
56 ;; The functions `xml-parse-file', `xml-parse-region' and
166 (defun xml-parse-file (file &optional parse-dtd parse-ns)
167 "Parse the well-formed XML file FILE.
172 (if (get-file-buffer file)
173 (with-current-buffer (get-file-buffer file)
180 (insert-file-contents file)
227 (defvar xml-tokenized-type-re "\\(?:ID\\|IDREF\\|IDREFS\\|ENTITY\\|ENTITIES\\|NMTOKEN\\|NMTOKENS\\)")
229 (defvar xml-notation-type-re (concat "\\(?:NOTATION" whitespace "(" whitespace "*" xml-name-re
236 (defvar xml-enumerated-type-re (concat "\\(?:" xml-notation-type-re "\\|" xml-enumeration-re "\\)"))
239 (defvar xml-att-type-re (concat "\\(?:CDATA\\|" xml-tokenized-type-re "\\|" xml-notation-type-re"\\|" xml-enumerated-type-re "\\)"))
244 whitespace "*" xml-att-type-re
558 ;;** The DTD (document type declaration)
583 type element end-pos)
626 type (match-string-no-properties 2))
631 ((string-match "^EMPTY[ \t\n\r]*$" type) ;; empty declaration
632 (setq type 'empty))
633 ((string-match "^ANY[ \t\n\r]*$" type) ;; any type of contents
634 (setq type 'any))
635 ((string-match "^(\\(.*\\))[ \t\n\r]*$" type) ;; children ([47])
636 (setq type (xml-parse-elem-type (match-string-no-properties 1 type))))
637 ((string-match "^%[^;]+;[ \t\n\r]*$" type) ;; substitution
641 (error "XML: (Validity) Invalid element type in the DTD"))))
650 (push (list element type) dtd)
689 (file (substring (match-string-no-properties 2) 1
695 (insert-file-contents file)
723 (defun xml-parse-elem-type (string)
724 "Convert element type STRING into a Lisp structure."
733 (mapcar 'xml-parse-elem-type
737 (mapcar 'xml-parse-elem-type