chickadee » atom » make-summary

make-rights contents #!key (type 'text)procedure
make-subtitle contents #!key (type 'text)procedure
make-summary contents #!key (type 'text)procedure
make-title contents #!key (type 'text)procedure

Create a new atom:rights, atom:subtitle, atom:summary, or atom:title element with CONTENTS of type TYPE. The accepted value for CONTENT varies according to TYPE:

'text
(default) a plain text string
'html
an HTML string (it will be escaped for you when written to XML)
'xhtml
an XHTML div element as SXML
> (make-title "Mesoamerican Deities and You")
  ; => (atom:title (@ (type "text")) "Mesoamerican Deities and You")
> (make-rights '(xhtml:div "Copyright (c) 2012 the feathered serpent, "
                           (xhtml:b "Quetzlcoatl"))
               type: 'xhtml)
  ; => (atom:rights (@ (type "xhtml"))
        (xhtml:div "Copyright (c) 2012 the feathered serpent, "
                   (xhtml:b "Quetzlcoatl")))
> (make-summary
   "<p>Coping strategies for when your best friend is a 
   <a href='http://en.wikipedia.org/wiki/Quetzalcoatl'>mythical god</a>
   and just <i>won't move out</i> of your cramped apartment</p>"
   type: 'html)
  ; => (atom:summary (@ (type "html"))
        "<p>Coping strategies for when your best friend is a
         <a href='http://en.wikipedia.org/wiki/Quetzalcoatl'>mythical god</a>
         and just <i>won't move out</i> of your cramped apartment</p>")