[cl-soap-cvs] CVS update: cl-soap/src/xsd.lisp
Sven Van Caekenberghe
scaekenberghe at common-lisp.net
Tue Sep 27 05:41:19 UTC 2005
Update of /project/cl-soap/cvsroot/cl-soap/src
In directory common-lisp.net:/tmp/cvs-serv3537/src
Modified Files:
xsd.lisp
Log Message:
bugfix: solitary primitive tags, like <name/> or empty tags like <name></name> where not handles correctly as primitive; now using lxml-* accessors
changed behavior of primitive string handling: NIL -> ""
Date: Tue Sep 27 07:41:18 2005
Author: scaekenberghe
Index: cl-soap/src/xsd.lisp
diff -u cl-soap/src/xsd.lisp:1.14 cl-soap/src/xsd.lisp:1.15
--- cl-soap/src/xsd.lisp:1.14 Mon Sep 26 16:40:37 2005
+++ cl-soap/src/xsd.lisp Tue Sep 27 07:41:18 2005
@@ -1,6 +1,6 @@
;;;; -*- mode: lisp -*-
;;;;
-;;;; $Id: xsd.lisp,v 1.14 2005/09/26 14:40:37 scaekenberghe Exp $
+;;;; $Id: xsd.lisp,v 1.15 2005/09/27 05:41:18 scaekenberghe Exp $
;;;;
;;;; A partial implementation of the XML Schema Definition standard
;;;;
@@ -305,7 +305,7 @@
(defun lxml-primitive-value (name type lxml namespace)
(let ((tag-name (intern name (s-xml:get-package namespace))))
(if (eql (lxml-get-tag lxml) tag-name)
- (values (xsd-primitive->lisp (second lxml) (intern-xsd-type-name type)) t)
+ (values (xsd-primitive->lisp (first (lxml-get-children lxml)) (intern-xsd-type-name type)) t)
(values nil nil))))
(defun resolve-primitive (element type-name lxml namespace)
@@ -691,9 +691,9 @@
"Convert the XSD string value to a Common Lisp value, interpreting it as type"
(ecase type
((:string :normalizedString :token)
- value)
+ (if (null value) "" value))
((:Name :QName :NCName :anyURI)
- value)
+ (if (null value) "" value))
((:integer
:positiveInteger :negativeInteger :nonPositiveInteger :nonNegativeInteger
:long :unsignedLong :int :unsignedInt :short :unsignedShort
More information about the Cl-soap-cvs
mailing list