Function: soap-namespace-put-link
soap-namespace-put-link is a byte-compiled function defined in
soap-client.el.gz.
Signature
(soap-namespace-put-link NAME TARGET NS)
Documentation
Store a link from NAME to TARGET in NS.
TARGET can be either a SOAP-ELEMENT or a string denoting an element name into another namespace.
If NAME is nil, an element with the same name as TARGET will be added to the namespace.
Source Code
;; Defined in /usr/src/emacs/lisp/net/soap-client.el.gz
(defun soap-namespace-put-link (name target ns)
"Store a link from NAME to TARGET in NS.
TARGET can be either a SOAP-ELEMENT or a string denoting an
element name into another namespace.
If NAME is nil, an element with the same name as TARGET will be
added to the namespace."
(unless (and name (not (equal name "")))
;; if name is nil, use TARGET as a name...
(cond ((soap-element-p target)
(setq name (soap-element-name target)))
((consp target) ; a fq name: (namespace . name)
(setq name (cdr target)))
((stringp target)
(cond ((string-match "^\\(.*\\):\\(.*\\)$" target)
(setq name (match-string 2 target)))
(t
(setq name target))))))
;; by now, name should be valid
(cl-assert (and name (not (equal name "")))
nil
"Cannot determine name for namespace link")
(push (make-soap-namespace-link :name name :target target)
(gethash name (soap-namespace-elements ns))))