;;;; in Text, HTML, and XML formats. This includes hyperlinking
;;;; capability and sub-objects.
;;;;
-;;;; $Id: ml-class.lisp,v 1.17 2002/10/16 21:58:49 kevin Exp $
+;;;; $Id: ml-class.lisp,v 1.21 2002/10/18 07:28:57 kevin Exp $
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(defmethod pcl:finalize-inheritance :after ((cl ml-class))
(init-ml-class cl))
+#+scl
+(defmethod clos:finalize-inheritance :after ((cl ml-class))
+ (init-ml-class cl))
+
#+sbcl
(defmethod sb-pcl:finalize-inheritance :after ((cl ml-class))
(defmethod pcl:validate-superclass ((class ml-class) (superclass pcl::standard-class))
t)
+#+scl
+(defmethod clos:validate-superclass ((class ml-class) (superclass standard-class))
+ t)
+
#+sbcl
(defmethod sb-pcl:validate-superclass ((class ml-class) (superclass sb-pcl::standard-class))
t)
(defmethod clos:finalize-inheritance :after ((cl ml-class))
(init-ml-class cl))
-;;#+cmu
-;;(defmethod pcl::class-finalized-p ((cl ml-class))
-;; (and (not (null (slot-value cl 'pcl::wrapper)))
-;; (not (null (slot-value cl 'fmtstr-text)))))
-
-;;#+sbcl
-;;(defmethod sb-pcl::class-finalized-p ((cl ml-class))
-;; (and (not (null (slot-value cl 'sb-pcl::wrapper)))
-;; (not (null (slot-value cl 'fmtstr-text)))))
-
#+lispworks
(defmethod clos:process-a-class-option ((class ml-class)
(name (eql :title))
(defparameter *default-textformat* nil)
(defparameter *default-htmlformat* nil)
(defparameter *default-htmlrefformat* nil)
+(defparameter *default-xhtmlformat* nil)
+(defparameter *default-xhtmlrefformat* nil)
(defparameter *default-xmlformat* nil)
(defparameter *default-xmlrefformat* nil)
(defparameter *default-ie-xmlrefformat* nil)
(setq *default-textformat* (make-instance 'textformat))
(setq *default-htmlformat* (make-instance 'htmlformat))
(setq *default-htmlrefformat* (make-instance 'htmlrefformat))
+ (setq *default-xhtmlformat* (make-instance 'xhtmlformat))
+ (setq *default-xhtmlrefformat* (make-instance 'xhtmlrefformat))
(setq *default-xmlformat* (make-instance 'xmlformat))
(setq *default-xmlrefformat* (make-instance 'xmlrefformat))
(setq *default-ie-xmlrefformat* (make-instance 'ie-xmlrefformat))
(:text *default-textformat*)
(:html *default-htmlformat*)
(:htmlref *default-htmlrefformat*)
- (:xml *default-xmlformat*)
+ (:xhtml *default-xhtmlformat*)
+ (:xhtmlref *default-xhtmlrefformat*)
(:xml *default-xmlformat*)
(:xmlref *default-xmlrefformat*)
(:ie-xmlref *default-ie-xmlrefformat*)
(values (ml-class-title x) nitems (class-name-of x)))
(defclass htmlformat (textformat)
+ ()
+ (:default-initargs :file-start-str "<html><body>~%"
+ :file-end-str "</body><html>~%"
+ :list-start-indent t
+ :list-start-fmtstr "<p><b>~a~p:</b></p><div class=\"~A\"><ul>~%"
+ :list-start-value-func #'htmlformat-list-start-value-func
+ :list-end-fmtstr "</ul></div>~%"
+ :list-end-indent t
+ :list-end-value-func #'identity
+ :obj-start-indent t
+ :obj-start-fmtstr "<li>"
+ :obj-start-value-func #'identity
+ :obj-end-indent t
+ :obj-end-fmtstr "</li>~%"
+ :obj-end-value-func #'identity
+ :obj-data-indent t
+ :obj-data-fmtstr #'ml-class-fmtstr-html-labels
+ :obj-data-fmtstr-labels #'ml-class-fmtstr-html-labels
+ :obj-data-value-func #'ml-class-value-func))
+
+(defclass xhtmlformat (textformat)
()
(:default-initargs :file-start-str "<html><body>~%"
:file-end-str "</body><html>~%"
(:documentation "Formatting for a linked reference"))
(defclass html-link-ref (link-ref)
+ ()
+ (:default-initargs :fmtstr #'ml-class-fmtstr-html-ref
+ :fmtstr-labels #'ml-class-fmtstr-html-ref-labels
+ :href-head "a href="
+ :href-end "a"
+ :ampersand "&"))
+
+(defclass xhtml-link-ref (link-ref)
()
(:default-initargs :fmtstr #'ml-class-fmtstr-html-ref
:fmtstr-labels #'ml-class-fmtstr-html-ref-labels
()
(:default-initargs :link-ref (make-instance 'html-link-ref)))
+(defclass xhtmlrefformat (xhtmlformat)
+ ()
+ (:default-initargs :link-ref (make-instance 'xhtml-link-ref)))
+
(defclass xmlrefformat (xmlformat)
()
(:default-initargs :link-ref (make-instance 'xml-link-ref)))