aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2011-03-05 11:32:10 +0100
committerMichael Albinus2011-03-05 11:32:10 +0100
commitd733e8178e48b2fac690ea676de1e39133f4e21e (patch)
treedfe9e10bb0a4a4593db155f8c2ecd67065ed0280
parent3ae59fff628e08b6e167ebdc4fd62e77048cec32 (diff)
downloademacs-d733e8178e48b2fac690ea676de1e39133f4e21e.tar.gz
emacs-d733e8178e48b2fac690ea676de1e39133f4e21e.zip
Add package name. Fix author email address.
* net/soap-client.el (soap-namespace-put-link): Check if the target name is fully qualified -- use only the name part. (soap-parse-complex-type, soap-parse-sequence): Recognize xsd:all types, treated the same as xsd:sequence. (Bug#8166)
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/soap-client.el21
-rw-r--r--lisp/net/soap-inspect.el3
3 files changed, 25 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 047d8bb5dcc..6aaadf2bae9 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12011-03-05 Alex Harsanyi <AlexHarsanyi@gmail.com>
2
3 * net/soap-client.el (soap-namespace-put-link): Check if the target
4 name is fully qualified -- use only the name part.
5 (soap-parse-complex-type, soap-parse-sequence): Recognize xsd:all
6 types, treated the same as xsd:sequence. (Bug#8166)
7
12011-03-05 Eli Zaretskii <eliz@gnu.org> 82011-03-05 Eli Zaretskii <eliz@gnu.org>
2 9
3 * files.el (find-file-noselect): Don't ask about re-visiting 10 * files.el (find-file-noselect): Don't ask about re-visiting
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index b4307223ba8..b5453733d1d 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -2,9 +2,10 @@
2 2
3;; Copyright (C) 2009-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2009-2011 Free Software Foundation, Inc.
4 4
5;; Author: Alexandru Harsanyi (AlexHarsanyi@gmail.com) 5;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
6;; Created: December, 2009 6;; Created: December, 2009
7;; Keywords: soap, web-services, comm, hypermedia 7;; Keywords: soap, web-services, comm, hypermedia
8;; Package: soap-client
8;; Homepage: http://code.google.com/p/emacs-soap-client 9;; Homepage: http://code.google.com/p/emacs-soap-client
9 10
10;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
@@ -323,13 +324,18 @@ added to the namespace."
323 ;; if name is nil, use TARGET as a name... 324 ;; if name is nil, use TARGET as a name...
324 (cond ((soap-element-p target) 325 (cond ((soap-element-p target)
325 (setq name (soap-element-name target))) 326 (setq name (soap-element-name target)))
327 ((consp target) ; a fq name: (namespace . name)
328 (setq name (cdr target)))
326 ((stringp target) 329 ((stringp target)
327 (cond ((string-match "^\\(.*\\):\\(.*\\)$" target) 330 (cond ((string-match "^\\(.*\\):\\(.*\\)$" target)
328 (setq name (match-string 2 target))) 331 (setq name (match-string 2 target)))
329 (t 332 (t
330 (setq name target)))))) 333 (setq name target))))))
331 334
332 (assert name) ; by now, name should be valid 335 ;; by now, name should be valid
336 (assert (and name (not (equal name "")))
337 nil
338 "Cannot determine name for namespace link")
333 (push (make-soap-namespace-link :name name :target target) 339 (push (make-soap-namespace-link :name name :target target)
334 (gethash name (soap-namespace-elements ns)))) 340 (gethash name (soap-namespace-elements ns))))
335 341
@@ -890,7 +896,11 @@ Return a SOAP-NAMESPACE containing the elements."
890 (when (consp c) ; skip string nodes, which are whitespace 896 (when (consp c) ; skip string nodes, which are whitespace
891 (let ((node-name (soap-l2wk (xml-node-name c)))) 897 (let ((node-name (soap-l2wk (xml-node-name c))))
892 (cond 898 (cond
893 ((eq node-name 'xsd:sequence) 899 ;; The difference between xsd:all and xsd:sequence is that fields
900 ;; in xsd:all are not ordered and they can occur only once. We
901 ;; don't care about that difference in soap-client.el
902 ((or (eq node-name 'xsd:sequence)
903 (eq node-name 'xsd:all))
894 (setq type (soap-parse-complex-type-sequence c))) 904 (setq type (soap-parse-complex-type-sequence c)))
895 ((eq node-name 'xsd:complexContent) 905 ((eq node-name 'xsd:complexContent)
896 (setq type (soap-parse-complex-type-complex-content c))) 906 (setq type (soap-parse-complex-type-complex-content c)))
@@ -909,9 +919,10 @@ NODE is assumed to be an xsd:sequence node. In that case, each
909of its children is assumed to be a sequence element. Each 919of its children is assumed to be a sequence element. Each
910sequence element is parsed constructing the corresponding type. 920sequence element is parsed constructing the corresponding type.
911A list of these types is returned." 921A list of these types is returned."
912 (assert (eq (soap-l2wk (xml-node-name node)) 'xsd:sequence) 922 (assert (let ((n (soap-l2wk (xml-node-name node))))
923 (memq n '(xsd:sequence xsd:all)))
913 nil 924 nil
914 "soap-parse-sequence: expecting xsd:sequence node, got %s" 925 "soap-parse-sequence: expecting xsd:sequence or xsd:all node, got %s"
915 (soap-l2wk (xml-node-name node))) 926 (soap-l2wk (xml-node-name node)))
916 (let (elements) 927 (let (elements)
917 (dolist (e (soap-xml-get-children1 node 'xsd:element)) 928 (dolist (e (soap-xml-get-children1 node 'xsd:element))
diff --git a/lisp/net/soap-inspect.el b/lisp/net/soap-inspect.el
index 7cce9844d76..8f67d02dc6f 100644
--- a/lisp/net/soap-inspect.el
+++ b/lisp/net/soap-inspect.el
@@ -2,9 +2,10 @@
2 2
3;; Copyright (C) 2010-2011 Free Software Foundation, Inc. 3;; Copyright (C) 2010-2011 Free Software Foundation, Inc.
4 4
5;; Author: Alexandru Harsanyi (AlexHarsanyi@gmail.com) 5;; Author: Alexandru Harsanyi <AlexHarsanyi@gmail.com>
6;; Created: October 2010 6;; Created: October 2010
7;; Keywords: soap, web-services, comm, hypermedia 7;; Keywords: soap, web-services, comm, hypermedia
8;; Package: soap-client
8;; Homepage: http://code.google.com/p/emacs-soap-client 9;; Homepage: http://code.google.com/p/emacs-soap-client
9 10
10;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.