;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Style sheet for slide shows (HTML version)
;; Jon Bosak 1998.09.06
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(declare-flow-object-class element
"UNREGISTERED::James Clark//Flow Object Class::element")
(declare-flow-object-class empty-element
"UNREGISTERED::James Clark//Flow Object Class::empty-element")
(declare-flow-object-class document-type
"UNREGISTERED::James Clark//Flow Object Class::document-type")
(declare-flow-object-class processing-instruction
"UNREGISTERED::James Clark//Flow Object Class::processing-instruction")
(declare-flow-object-class entity
"UNREGISTERED::James Clark//Flow Object Class::entity")
(declare-flow-object-class entity-ref
"UNREGISTERED::James Clark//Flow Object Class::entity-ref")
(declare-flow-object-class formatting-instruction
"UNREGISTERED::James Clark//Flow Object Class::formatting-instruction")
"))
(define A-ETAG (make formatting-instruction data: ""))
(define PREV (make formatting-instruction
data: "'>
"))
(define NEXT (make formatting-instruction
data: "'>
"))
(define BR-TAG (make formatting-instruction data: "
"))
(define internal-use #f) ;; can be overridden from command line
(define FOOTER
(if internal-use
(make formatting-instruction
data: "'>SUN PROPRIETARY/CONFIDENTIAL: INTERNAL USE ONLY")
(make formatting-instruction
data: "'>XML & JAVA: \U-00A0 PORTABLE DATA \U-2014 PORTABLE PROGRAMS")))
]]>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; global parameters
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define %hf-bgcolor% "#BBBBFF")
(define %footer-color% "#AAAAFF")
(define %side-space% "3%")
(define %center-space% "94%")
(define %body-size% "+3")
(define %slidehead-size% "+6")
(define %slidesubtitle-size% "+3")
(define %toc-size% "+1")
(define %footer-size% "-2")
(define %body-face% "arial, helvetica")
(define %code-face% "courier new")
(define (VSPACE)
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" "-1")
(list "FACE" %body-face%))
(literal "\U-00A0")))) ;; nonbreaking space
(define (BODY-FONT) ;; barf
(make element
gi: "FONT"
attributes: (list (list "SIZE" %body-size%)
(list "FACE" %body-face%))))
(define (HSPACE)
(sosofo-append
(make element
gi: "FONT"
attributes: (list (list "SIZE" "-1")
(list "FACE" %body-face%))
(make sequence
(literal "\U-00A0 \U-00A0 \U-00A0 \U-00A0 \U-00A0 \U-00A0")))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; big pieces
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(element SLIDESHOW (process-children))
(element SLIDEMODULE (process-children))
(element SHOWHEAD (empty-sosofo))
(element MODHEAD (empty-sosofo))
(mode showhead-mode
(element SHOWHEAD
(make sequence
(process-children)))
(element SHOWTITLESLIDE (empty-sosofo))
(element SLIDEMODULE (empty-sosofo)))
(mode modhead-mode
(element MODHEAD
(make sequence
(process-children)))
(element MODULETITLESLIDE (empty-sosofo))
(element SLIDE (empty-sosofo)))
(element (SHOWTITLESLIDE TITLE) (empty-sosofo))
(element (SHOWTITLESLIDE SUBTITLE) (empty-sosofo))
(element SHOWTITLESLIDE
(make entity
system-id: "sld00000.htm"
(make element
gi: "HTML"
(sosofo-append
(make element
gi: "HEAD"
(sosofo-append
(make element
gi: "TITLE"
(with-mode showhead-mode
(process-node-list (ancestor "SLIDESHOW"))))))
(make element
gi: "BODY"
attributes: (list (list "BGCOLOR" "#FFFFFF"))
;;;;;;;;;;;;;;;;;;;; this is the table that contains the whole slide
(sosofo-append
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; main title
(make element
gi: "TABLE"
attributes: (list (list "WIDTH" "100%")
(list "CELLSPACING" "6")
(list "CELLPADDING" "6"))
(with-mode showtitle-mode
(process-children)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; subtitles
(VSPACE)
(make element
gi: "TABLE"
attributes: (list (list "WIDTH" "100%")
(list "CELLSPACING" "0")
(list "CELLPADDING" "0"))
(with-mode showsubtitle-mode
(process-children)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slideshow TOC
(VSPACE)
(make element
gi: "TABLE"
attributes: (list (list "WIDTH" "100%")
(list "CELLSPACING" "0")
(list "CELLPADDING" "0"))
(make element
gi: "TR"
(sosofo-append
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))
(make element ;; the slideshow TOC goes here
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %center-space%))
(process-children)
(sosofo-append
(make element
gi: "P"
attributes: (list (list "CLASS" "TOCSPACER"))
(literal " "))
(with-mode showtoc
(sosofo-append
(process-node-list
(select-elements
(descendants
(ancestor "SLIDESHOW"))
"MODULETITLESLIDE"))))))
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slideshow title footer
(make element
gi: "TABLE"
attributes: (list (list "WIDTH" "100%")
(list "CELLSPACING" "0")
(list "CELLPADDING" "0"))
(make element
gi: "TR"
(sosofo-append
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))
(make element
gi: "TD"
(sosofo-append
(VSPACE)
(make element
gi: "P"
attributes: (list (list "ALIGN" "CENTER")
(list "VALIGN" "BOTTOM"))
(make element
gi: "FONT"
attributes: (list (list "SIZE" %footer-size%)
(list "COLOR" %footer-color%)
(list "FACE" %body-face%))
(sosofo-append
A-STAGO
(literal "sld00000.htm")
FOOTER
A-ETAG)))))
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo)))))))))))
(mode showtoc
(element MODULETITLESLIDE (process-children))
(element TITLE (process-children))
(element (MODULETITLESLIDE TITLE LINE)
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %toc-size%)
(list "FACE" %body-face%))
(sosofo-append
(HSPACE)
A-STAGO
(literal (SLIDEFILE
(ancestor-child-number "SLIDEMODULE") 0))
A-STAGC
(process-children)
A-ETAG)))))
(define (SLIDEFILE m n)
(let* ((mstr (number->string m))
(mmstr
(if (< m 10)
(string-append "0" mstr)
mstr))
(nstr (number->string n))
(nnstr
(if (< n 10)
(string-append "00" nstr)
(if (< n 100)
(string-append "0" nstr)
nstr))))
(string-append "sld" mmstr nnstr ".htm")))
(element (MODULETITLESLIDE TITLE) (empty-sosofo))
(element MODULETITLESLIDE
(make entity
system-id: (SLIDEFILE (ancestor-child-number "SLIDEMODULE") 0)
(make element
gi: "HTML"
(sosofo-append
(make element
gi: "HEAD"
(sosofo-append
(make element
gi: "TITLE"
(with-mode modhead-mode
(process-node-list (ancestor "SLIDEMODULE"))))))
(make element
gi: "BODY"
attributes: (list (list "BGCOLOR" "#FFFFFF"))
;;;;;;;;;;;;;;;;;;;; this is the table that contains the whole slide
(make element
gi: "TABLE"
attributes: (list (list "WIDTH" "100%")
(list "CELLSPACING" "6")
(list "CELLPADDING" "6"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slide header
(with-mode moduletitle-mode
(process-children))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slide body
(make element
gi: "TR"
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))
(make element ;; the module TOC goes here
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %center-space%))
(process-children)
(sosofo-append
(VSPACE)
(with-mode moduletoc
(sosofo-append
(process-node-list
(select-elements
(descendants
(ancestor "SLIDEMODULE"))
"SLIDE"))))
(VSPACE)))
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slide footer
(make element
gi: "TR"
(sosofo-append
(make element
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE"))
(sosofo-append
A-STAGO
(literal "sld00000.htm")
PREV))
(make element
gi: "TD"
(make element
gi: "P"
attributes: (list (list "ALIGN" "CENTER")
(list "VALIGN" "BOTTOM"))
(make element
gi: "FONT"
attributes: (list (list "SIZE" %footer-size%)
(list "COLOR" %footer-color%)
(list "FACE" %body-face%))
(sosofo-append
A-STAGO
(literal "sld00000.htm")
FOOTER
A-ETAG))))
(make element
gi: "TD"
attributes: (list (list "ALIGN" "RIGHT")
(list "VALIGN" "MIDDLE"))
(sosofo-append
A-STAGO
(literal
(SLIDEFILE
(ancestor-child-number "SLIDEMODULE") 1))
NEXT))))))))))
(mode moduletoc
(element SLIDE (process-children))
(element SLIDEHEAD (empty-sosofo))
(element (SLIDE SLIDEHEAD)
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %toc-size%)
(list "FACE" %body-face%))
(sosofo-append
(HSPACE)
A-STAGO
(literal (SLIDEFILE
(ancestor-child-number "SLIDEMODULE")
(ancestor-child-number "SLIDE")))
A-STAGC
(process-children)
A-ETAG))))
(element P (empty-sosofo))
(element CODECOMMENT (empty-sosofo))
(element CODESAMPLE (empty-sosofo))
(element BULLETLIST (empty-sosofo))
(element BULLETSUBLIST (empty-sosofo))
(element NUMBEREDLIST (empty-sosofo))
(element FLATLIST (empty-sosofo))
(element IMAGE (empty-sosofo))
(element CONNECTOR (empty-sosofo)))
(element SLIDEHEAD (empty-sosofo))
(element SLIDE
(make entity
system-id: (SLIDEFILE (ancestor-child-number "SLIDEMODULE")
(child-number))
(make element
gi: "HTML"
(sosofo-append
(make element
gi: "HEAD"
(sosofo-append
(make element
gi: "TITLE"
(with-mode modhead-mode
(process-node-list
(ancestor "SLIDEMODULE"))))))
(make element
gi: "BODY"
attributes: (list (list "BGCOLOR" "#FFFFFF"))
;;;;;;;;;;;;;;;;;;;; this is the table that contains the whole slide
(make element
gi: "TABLE"
attributes: (list (list "WIDTH" "100%")
(list "CELLSPACING" "6")
(list "CELLPADDING" "6"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slide header
(with-mode slidehead-mode
(process-children))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slide body
(make element
gi: "TR"
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))
(make element
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %center-space%))
(VSPACE)
(process-children)) ;; most of the slide goes here!
(make element ;; empty cell
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; slide footer
(make element
gi: "TR"
(sosofo-append
(make element
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE"))
(sosofo-append
A-STAGO
(literal
(SLIDEFILE
(ancestor-child-number "SLIDEMODULE")
(- (child-number) 1)))
PREV))
(make element
gi: "TD"
(make element
gi: "P"
attributes: (list (list "ALIGN" "CENTER")
(list "VALIGN" "BOTTOM"))
(make element
gi: "FONT"
attributes: (list (list "SIZE" %footer-size%)
(list "COLOR" %footer-color%)
(list "FACE" %body-face%))
(sosofo-append
A-STAGO
(literal "sld00000.htm")
FOOTER
A-ETAG))))
(make element
gi: "TD"
attributes: (list (list "ALIGN" "RIGHT")
(list "VALIGN" "MIDDLE"))
(if (not (last-sibling?))
(sosofo-append
A-STAGO
(literal
(SLIDEFILE
(ancestor-child-number "SLIDEMODULE")
(+ (child-number) 1)))
NEXT)
(sosofo-append
A-STAGO
(literal "sld00000.htm")
NEXT)))))))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; paragraphs
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(mode showtitle-mode
(element TITLE
(make element
gi: "TR"
(sosofo-append
(make element
gi: "TH"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))
(make element
gi: "TH"
attributes: (list (list "BGCOLOR" %hf-bgcolor%)
(list "WIDTH" %center-space%)
(list "ALIGN" "CENTER")
(list "VALIGN" "MIDDLE"))
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %slidehead-size%)
(list "FACE" %body-face%))
(process-children))))
(make element
gi: "TH"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))))))
(mode showsubtitle-mode
(element SUBTITLE
(make element
gi: "TR"
(sosofo-append
(make element
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo))
(make element
gi: "TD"
attributes: (list (list "BGCOLOR" "#FFFFFF")
(list "WIDTH" %center-space%)
(list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE"))
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %body-size%)
(list "FACE" %body-face%))
(sosofo-append
(VSPACE)
(process-children)))))
(make element
gi: "TD"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(empty-sosofo)))))
(element LINE
(sosofo-append
(HSPACE)
(process-children)
(make empty-element
gi: "BR"))))
(mode moduletitle-mode
(element P (empty-sosofo))
(element BULLETLIST (empty-sosofo))
(element BULLETSUBLIST (empty-sosofo))
(element NUMBEREDLIST (empty-sosofo))
(element FLATLIST (empty-sosofo))
(element IMAGE (empty-sosofo))
(element CONNECTOR (empty-sosofo))
(element CODECOMMENT (empty-sosofo))
(element CODESAMPLE (empty-sosofo))
(element (MODULETITLESLIDE TITLE)
(make element
gi: "TR"
(sosofo-append
(make element
gi: "TH"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(sosofo-append
A-STAGO
(literal "sld00000.htm")
PREV))
(make element
gi: "TH"
attributes: (list (list "BGCOLOR" %hf-bgcolor%)
(list "WIDTH" %center-space%)
(list "ALIGN" "CENTER")
(list "VALIGN" "MIDDLE"))
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %slidehead-size%)
(list "FACE" %body-face%))
(process-children))))
(make element
gi: "TH"
attributes: (list (list "ALIGN" "RIGHT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
A-STAGO
(literal
(SLIDEFILE
(ancestor-child-number "SLIDEMODULE") 1))
NEXT)))))
(mode slidehead-mode
(element P (empty-sosofo))
(element BULLETLIST (empty-sosofo))
(element BULLETSUBLIST (empty-sosofo))
(element NUMBEREDLIST (empty-sosofo))
(element FLATLIST (empty-sosofo))
(element IMAGE (empty-sosofo))
(element CONNECTOR (empty-sosofo))
(element CODECOMMENT (empty-sosofo))
(element CODESAMPLE (empty-sosofo))
(element SLIDEHEAD
(make element
gi: "TR"
(sosofo-append
(make element
gi: "TH"
attributes: (list (list "ALIGN" "LEFT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(sosofo-append
A-STAGO
(literal
(SLIDEFILE
(ancestor-child-number "SLIDEMODULE")
(- (ancestor-child-number "SLIDE") 1)))
PREV))
(make element
gi: "TH"
attributes: (list (list "BGCOLOR" %hf-bgcolor%)
(list "WIDTH" %center-space%)
(list "ALIGN" "CENTER")
(list "VALIGN" "MIDDLE"))
(make element
gi: "P"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %slidehead-size%)
(list "FACE" %body-face%))
(process-children))))
(make element
gi: "TH"
attributes: (list (list "ALIGN" "RIGHT")
(list "VALIGN" "MIDDLE")
(list "WIDTH" %side-space%))
(if (not (last-sibling? (ancestor "SLIDE")))
(sosofo-append
A-STAGO
(literal
(SLIDEFILE
(ancestor-child-number "SLIDEMODULE")
(+ (ancestor-child-number "SLIDE") 1)))
NEXT)
(sosofo-append
A-STAGO
(literal "sld00000.htm")
NEXT)))))))
(element CODECOMMENT
(make element
gi: "P"
(make element
gi: "CODE"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %body-size%)
(list "FACE" %body-face%))
(make element
gi: "I")))))
(element CODESAMPLE
(make element
gi: "PRE"
(make element
gi: "CODE"
(make element
gi: "FONT"
attributes: (list (list "SIZE" %body-size%)
(list "FACE" %code-face%))
(make element
gi: "B")))))
(element P
(make element
(make element
gi: "FONT"
attributes: (list (list "SIZE" %body-size%)
(list "FACE" %body-face%)))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; lists
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(element FLATLIST
(make element
gi: "P"
(BODY-FONT)))
(element (FLATLIST ITEM)
(make sequence
(process-children)
(make empty-element
gi: "BR")))
(element BULLETLIST
(make element
gi: "UL"
(BODY-FONT)))
(element BULLETSUBLIST
(make element
gi: "UL"
(BODY-FONT)))
(element NUMBEREDLIST
(make element
gi: "OL"
(BODY-FONT)))
(element ITEM
(make element
gi: "LI"
(BODY-FONT)))
(element (ITEM P)
(if (= (child-number) 1)
(make sequence)
(make element
gi: "P"
(BODY-FONT))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; inlines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(element B
(make element
gi: "B"))
(element I
(make element
gi: "I"))
(element EMPH
(make element
gi: "B"
(make element
gi: "I")))
(element HLINK
(make element
gi: "A"
attributes: (list (list "HREF" (attribute-string "href")))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; graphics
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(element IMAGE
(let ((align (attribute-string "align")))
(if (and (string? align) (equal? align "CENTER"))
(make element
gi: "CENTER"
(make element
gi: "IMG"
attributes: (list (list "SRC"
(attribute-string "src"))
(list "ALT"
(data (current-node)))
(list "ALIGN"
(attribute-string "align")))
(empty-sosofo)))
(make element
gi: "IMG"
attributes: (list (list "SRC" (attribute-string "src"))
(list "ALT" (data (current-node)))
(list "ALIGN" (attribute-string "align")))
(empty-sosofo)))))