Function: rng-get-parsed-schema-locating-file

rng-get-parsed-schema-locating-file is a byte-compiled function defined in rng-loc.el.gz.

Signature

(rng-get-parsed-schema-locating-file FILE)

Documentation

Return a list of rules for the schema locating file FILE.

Source Code

;; Defined in /usr/src/emacs/lisp/nxml/rng-loc.el.gz
(defun rng-get-parsed-schema-locating-file (file)
  "Return a list of rules for the schema locating file FILE."
  (setq file (expand-file-name file))
  (let ((cached (assoc file rng-schema-locating-file-alist))
	(mtime (file-attribute-modification-time (file-attributes file)))
	parsed)
    (cond ((not mtime)
	   (when cached
	     (setq rng-schema-locating-file-alist
		   (delq cached rng-schema-locating-file-alist)))
	   nil)
	  ((and cached (time-equal-p (nth 1 cached) mtime))
	   (nth 2 cached))
	  (t
	   (setq parsed (rng-parse-schema-locating-file file))
	   (if cached
	       (setcdr cached (list mtime parsed))
	     (setq rng-schema-locating-file-alist
		   (cons (list file mtime parsed)
			 rng-schema-locating-file-alist)))
	   parsed))))