X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=views.lisp;h=f4f075742d6156bb55f0af351f9cd5bd636b65e2;hb=47a7911aaa793adcce5add7bc912ded4bff18d99;hp=f8b2649a76794daf026b73251610ca22ec8540c8;hpb=ea98a28a5dfc909db12faab3693ece8feab0ca22;p=hyperobject.git diff --git a/views.lisp b/views.lisp index f8b2649..f4f0757 100644 --- a/views.lisp +++ b/views.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: views.lisp,v 1.17 2002/12/24 06:30:29 kevin Exp $ +;;;; $Id: views.lisp,v 1.18 2002/12/26 11:57:15 kevin Exp $ ;;;; ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg ;;;; @@ -184,10 +184,12 @@ (let ((slot (find-slot-by-name obj-cl slot-name))) (unless slot (error "Slot ~A is not found in class ~S" slot-name obj-cl)) - (let ((name (slot-definition-name slot)) - (namestr-lower (string-downcase (symbol-name (slot-definition-name slot)))) - (type (slot-value slot 'type)) - (print-formatter (esd-print-formatter slot))) + (let* ((name (slot-definition-name slot)) + (namestr-lower (string-downcase (symbol-name name))) + (xml-namestring (escape-xml-string namestr-lower)) + (xml-tag (escape-xml-string namestr-lower)) + (type (slot-value slot 'type)) + (print-formatter (esd-print-formatter slot))) (cond (first-field @@ -216,9 +218,9 @@ (:html-labels (string-append fmtstr (concatenate 'string "" namestr-lower " " value-fmt ""))) (:xhtml-labels - (string-append fmtstr (concatenate 'string " " value-fmt ""))) + (string-append fmtstr (concatenate 'string "" xml-namestr " " value-fmt ""))) (:xml-labels - (string-append fmtstr (concatenate 'string " <" namestr-lower ">" value-fmt ""))) + (string-append fmtstr (concatenate 'string " <" xml-tag ">" value-fmt ""))) ((or :html-link :xhtml-link) (push name links) (if (esd-hyperlink slot) @@ -228,7 +230,7 @@ (push name links) (if (esd-hyperlink slot) (string-append fmtstr "<~~a>" value-fmt "") - (string-append fmtstr (concatenate 'string "<" namestr-lower ">" value-fmt "")))) + (string-append fmtstr (concatenate 'string "<" xml-tag ">" value-fmt "")))) (:html-link-labels (push name links) (if (esd-hyperlink slot) @@ -237,13 +239,13 @@ (:xhtml-link-labels (push name links) (if (esd-hyperlink slot) - (string-append fmtstr "<[!CDATA[" namestr-lower "]]> <~~a>" value-fmt "") - (string-append fmtstr (concatenate 'string " " value-fmt "")))) + (string-append fmtstr "" xml-namestr " <~~a>" value-fmt "") + (string-append fmtstr (concatenate 'string "" xml-namestr " " value-fmt "")))) ((or :xml-link-labels :ie-xml-link-labels) (push name links) (if (esd-hyperlink slot) - (string-append fmtstr " <~~a>" value-fmt "") - (string-append fmtstr (concatenate 'string " <" namestr-lower ">" value-fmt ""))))) + (string-append fmtstr " <~~a>" value-fmt "") + (string-append fmtstr (concatenate 'string " <" xml-tag ">" value-fmt ""))))) ) ;; let value-fmt (let ((func (if print-formatter