Function: nnrss-get-namespace-prefix
nnrss-get-namespace-prefix is a byte-compiled function defined in
nnrss.el.gz.
Signature
(nnrss-get-namespace-prefix EL URI)
Documentation
Given EL (containing a parsed element) and URI (containing a string that gives the URI for which you want to retrieve the namespace prefix), return the prefix.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnrss.el.gz
(defun nnrss-get-namespace-prefix (el uri)
"Given EL (containing a parsed element) and URI (containing a string
that gives the URI for which you want to retrieve the namespace
prefix), return the prefix."
(let* ((dom (car el))
(prefix (car (rassoc uri (dom-attributes
(dom-search
dom
(lambda (node)
(rassoc uri (dom-attributes node))))))))
(nslist (if prefix
(split-string (symbol-name prefix) ":")))
(ns (cond ((eq (length nslist) 1) ; no prefix given
"")
((eq (length nslist) 2) ; extract prefix
(cadr nslist)))))
(if (and ns (not (string= ns "")))
(concat ns ":")
ns)))