Function: rng-name-class-possible-names

rng-name-class-possible-names is a byte-compiled function defined in rng-match.el.gz.

Signature

(rng-name-class-possible-names NC ACCUM)

Documentation

Return a list of possible names that nameclass NC can match.

Each possible name should be returned as a (NAMESPACE . LOCAL-NAME) pair, where NAMESPACE is a symbol or nil and LOCAL-NAME is a string. NAMESPACE, if nil, matches the absent namespace. ACCUM is a list of names which should be appended to the returned list. The returned list may contain duplicates.

Source Code

;; Defined in /usr/src/emacs/lisp/nxml/rng-match.el.gz
(defun rng-name-class-possible-names (nc accum)
  "Return a list of possible names that nameclass NC can match.

Each possible name should be returned as a (NAMESPACE . LOCAL-NAME)
pair, where NAMESPACE is a symbol or nil and LOCAL-NAME is a string.
NAMESPACE, if nil, matches the absent namespace.  ACCUM is a list of
names which should be appended to the returned list.  The returned
list may contain duplicates."
  (if (consp nc)
      (cons nc accum)
    (when (eq (aref nc 0) 'choice)
      (let ((members (aref nc 1)) member)
	(while members
	  (setq member (car members))
	  (setq accum
		(if (consp member)
		    (cons member accum)
		  (rng-name-class-possible-names member
						 accum)))
	  (setq members (cdr members)))))
    accum))