[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master a255caf 1/3: soap-client: Allow attributes and a va
From: |
Thomas Fitzsimmons |
Subject: |
[Emacs-diffs] master a255caf 1/3: soap-client: Allow attributes and a value |
Date: |
Wed, 24 Jul 2019 05:07:14 -0400 (EDT) |
branch: master
commit a255caf19b9a3e45472d2a2d14fa8087eea838f1
Author: Thomas Fitzsimmons <address@hidden>
Commit: Thomas Fitzsimmons <address@hidden>
soap-client: Allow attributes and a value
* lisp/net/soap-client.el (soap-encode-xs-basic-type): Allow
attributes and a value to be specified in the same element.
---
lisp/net/soap-client.el | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 1632ee1..40c6e62 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -464,8 +464,14 @@ position.
This is a specialization of `soap-encode-value' for
`soap-xs-basic-type' objects."
- (let ((kind (soap-xs-basic-type-kind type)))
-
+ (let ((kind (soap-xs-basic-type-kind type))
+ ;; Handle conversions of this form:
+ ;; (Element (AttrA . "A") (AttrB . "B") "Value here")
+ ;; to:
+ ;; <ns:Element AttrA="A" AttrB="B">Value here</ns:Element>
+ ;; by assuming that if this is a list, it must have attributes
+ ;; preceding the basic value.
+ (value (if (listp value) (progn (car (last value))) value)))
(when (eq kind 'anyType)
(cond ((stringp value)
(setq kind 'string))