[Add subclassing support to xml types clinton@unknownlamer.org**20090501222640 Ignore-this: ce5fbf0f4aeecd275879d1e09fc569f5 ] hunk ./src/codec.lisp 6 -(defmacro define-xml-type (XML-TYPE LISP-TYPE-SPEC PARSE UNPARSE) +(defmacro define-xml-type (XML-TYPE XML-SUPERS LISP-TYPE-SPEC PARSE UNPARSE) hunk ./src/codec.lisp 9 - ,lisp-type-spec) + (quote ,(if xml-supers + `(and ,@xml-supers ,lisp-type-spec) + lisp-type-spec))) hunk ./src/codec.lisp 24 -(defmacro define-simple-xml-type (type-name type-spec +(defmacro define-simple-xml-type ((type-name &rest supers) type-spec hunk ./src/codec.lisp 28 - `(define-xml-type ,type-name ,type-spec + `(define-xml-type ,type-name ,supers ,type-spec hunk ./src/codec.lisp 45 - ',(second def) + ,(second def) hunk ./src/codec.lisp 50 - (xmlisp2.types:decimal number) - (xmlisp2.types:float single-float) - (xmlisp2.types:double double-float))) + ((xmlisp2.types:decimal) number) + ((xmlisp2.types:float) single-float) + ((xmlisp2.types:double) double-float))) hunk ./src/codec.lisp 54 -(define-xml-type xmlisp2.types:boolean `(member t nil) +(define-simple-xml-type (xmlisp2.types:integer xmlisp2.types:decimal) integer + (parse-integer) (princ-to-string integer)) + +(define-xml-type xmlisp2.types:boolean () (member t nil) hunk ./src/codec.lisp 67 -(define-simple-xml-type xmlisp2.types:string `cl:string (identity) +(define-simple-xml-type (xmlisp2.types:string) cl:string (identity)