Function: soap-wk2l

soap-wk2l is a byte-compiled function defined in soap-client.el.gz.

Signature

(soap-wk2l WELL-KNOWN-NAME)

Documentation

Return local variant of WELL-KNOWN-NAME.

This is done by looking up the namespace in the soap-well-known-xmlns table and resolving the namespace to the local name based on the current local translation table soap-local-xmlns. See also soap-with-local-xmlns.

Source Code

;; Defined in /usr/src/emacs/lisp/net/soap-client.el.gz
(defun soap-wk2l (well-known-name)
  "Return local variant of WELL-KNOWN-NAME.
This is done by looking up the namespace in the
`soap-well-known-xmlns' table and resolving the namespace to
the local name based on the current local translation table
`soap-local-xmlns'.  See also `soap-with-local-xmlns'."
  (let ((wk-name-1 (if (symbolp well-known-name)
                       (symbol-name well-known-name)
                     well-known-name)))
    (cond
     ((string-match "^\\(.*\\):\\(.*\\)$" wk-name-1)
      (let ((ns (match-string 1 wk-name-1))
            (name (match-string 2 wk-name-1)))
        (let ((namespace (cdr (assoc ns soap-well-known-xmlns))))
          (cond ((equal namespace soap-default-xmlns)
                 ;; Name is unqualified in the default namespace
                 (if (symbolp well-known-name)
                     (intern name)
                   name))
                (t
                 (let* ((local-ns (car (rassoc namespace soap-local-xmlns)))
                        (local-name (concat local-ns ":" name)))
                   (if (symbolp well-known-name)
                       (intern local-name)
                     local-name)))))))
     (t well-known-name))))