Fix xml printing
[hyperobject.git] / mop.lisp
index 093861f76c609d8cbae6d3060e0e173c63b43b60..96eb3256058c5bfb8870b274b4ab5d6e3aedc968 100644 (file)
--- a/mop.lisp
+++ b/mop.lisp
                      :lookup nil :lookup-keys nil))
 
 
-(defmethod print-object ((obj subobject) (s stream))
+(defmethod print-object ((obj subobject) s)
   (print-unreadable-object (obj s :type t)
     (format s "~S" (name-slot obj))))
 
    (link-parameters :type list :initform nil :initarg :link-parameters
                     :reader link-parameters)))
 
-(defmethod print-object ((obj hyperlink) (s stream))
+(defmethod print-object ((obj hyperlink) s)
   (print-unreadable-object (obj s :type t :identity t)
     (format s "~S" (name obj))))
 
 (defmethod finalize-inheritance :after ((cl hyperobject-class))
   "Initialize a hyperobject class. Calculates all class slots"
   (finalize-subobjects cl)
-  (finalize-compute-cached cl))
+  (finalize-compute-cached cl)
+  (init-hyperobject-class cl))
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (when (>= (length (generic-function-lambda-list
@@ -401,6 +402,13 @@ SQL name"
   (or (eq type 'string)
       (and (listp type) (some #'(lambda (x) (eq x 'string)) type))))
 
+(defun value-type-is-a-string (type)
+  (or (eq type 'string)
+      (eq type 'u::cdata)
+      (and (listp type) (some #'(lambda (x) (or (eq x 'string)
+                                                (eq x 'u::cdata)))
+                              type))))
+
 (defun base-value-type (value-type)
   (if (atom value-type)
       value-type