(load (string-append laml-dir "laml.scm")) (laml-style "xml-in-laml/lecture-notes/lecture-notes") (leno-front-matters (front-title "Programmatic WWW authoring") (front-subtitle "Using Scheme and LAML") (front-author "Kurt Nørmark") (front-affiliation "Department of Computer Science, Aalborg University," (br) "Denmark") (front-abstract "This is the presentation of the paper" (a 'href "http://www.cs.auc.dk/~normark/laml/papers/www2002/p296-normark.html" "Programmatic WWW authoring using Scheme and LAML") "at the WWW2002 conference, Honolulu, USA, May 2002.") 'scheme-suffix "post-notes.scm" 'course-home-url "http://www.cs.auc.dk/~normark/" 'author-home-url "http://www.cs.auc.dk/~normark/" 'note-download-url "" 'logo-url "http://www.auc.dk/" 'note-contents-description "" 'slide-header "normal" ; minimal/normal/none 'trail-of-lecture "false" 'language "english" 'show-and-speak "false" 'default-showing-time "2" 'additional-showing-time "0" 'sound-source "real-audio" 'speak-url-prefix "../../speak/" 'exercise-model "none" 'mouse-advancement "double-press" 'word-index "true" 'apply-css-styling "false" 'news-flash-string "" 'news-flash-level "2" 'quiz-support "false" 'verbosity-level "1" ) (begin-notes) (note-page 'id "denmark" (title (main-text "Where is Denmark?") (annotation "") ) (image 'src "europe.gif" (main-text "The location of Denmark in Europe" ) ) (index-words ) ) (note-page 'id "aalborg" (title (main-text "Where is Aalborg?") (annotation "") ) (image 'src "denmark.gif" (main-text "The location of Aalborg in Denmark" ) ) (index-words ) ) (note-page 'id "overview" 'drop "true" (title (main-text "Overview of this presentation") (annotation "This gives an itemized overview of the presentation") ) (items 'margin-left "5em" (item (main-text (b "Programmatic authoring") ) (annotation "" ) (items (item (main-text "A simple example" ) (annotation "" ))) ) (item (main-text (b "The idea of an HTML mirror in a programming language") ) (annotation "" ) (items (item (main-text "Introduced by examples" ) (annotation "" ))) ) (item (main-text (b "LAML document styles") ) (annotation "" ) (items (item (main-text "LENO" ) (annotation "" )) (item (main-text "XML-in-LAML" ) (annotation "" )) ) ) (item (main-text (b "Reflections and conclusions") ) (annotation "" )) ) (index-words (index-word "paper overview") ) ) (note-page 'id "prog-authoring-section" (section-title "Programmatic Authoring") ) (note-page 'id "premises" (title (main-text "Premises") (annotation "") ) (items 'margin-left "3ex" (item (main-text (b "Programmatic authoring of static documents") ) (items (item (main-text "Derivation of a set of HTML documents from a single document source" )) )) (item (main-text (b "Authoring of complex material") ) (items (item (main-text "Material in several versions" )) (item (main-text "Comprehensive linking" )) (item (main-text "Multiple overlapping views" ))))) (point 'margin-top "7em" (main-text "LAML is also oriented towards server dynamic pages calculated at document access time" ) ) (index-words ) ) (note-page 'id "kinds-of-documents" 'drop "true" (title (main-text "Classes of WWW documents") ) (point (main-text "We want to distinguish between several kinds of different web documents" ) ) (items (item (main-text (b "Static documents") ) (annotation "" ) (items (item (main-text "Authored in a markup language - bound at edit time" ) (annotation "" )))) (item (main-text (font-color red (b "Generated documents")) ) (annotation "" ) (items (item (main-text "Translated from another language to HTML - bound at translation time" ) (annotation "" )))) (item (main-text (b "Calculated documents") ) (annotation "" ) (items (item (main-text "Generated from a program - bound at document access time" ) (annotation "" )))) (item (main-text (b "Dynamic documents") ) (annotation "" ) (items (item (main-text "Partly generated from a program - bound at browse time" ) (annotation "" ))))) (index-words ) ) (note-page 'id "prog-authoring" (title (main-text "Programmatic authoring") (annotation "") ) (items 'margin-left "2em" (item (main-text (b "Document source language") ) (items (item (main-text "A programming language" )))) (item (main-text (b "Program execution") ) (items (item (main-text "Generates the underlying HTML pages" )))) (item (main-text (b "Abstraction") ) (items (item (main-text "Document details can be encapsulated in functions" )))) (item (main-text (b "Automation") ) (items (item (main-text "Routine tasks can be programmed in procedures" ))))) (point 'margin-top "5em" (main-text "Authoring of" (em "complex web materials") "involves the same problems and solutions as development of non-trivial software" ) (annotation "" ) ) (index-words ) ) (note-page 'id "example-prog-authoring" (title (main-text "An example of programmatic authoring")) (source-program 'src "includes/initial-example/initial-document.html" 'slide-mode "external" 'book-mode "inline" (main-text "A very simple HTML document" ) (annotation "") ) (source-program 'src "includes/initial-example/doc1.laml" 'slide-mode "inline" 'book-mode "inline" 'background-color (rgb-color-encoding (make-color 209 209 163)) (color-decorations (color-decoration 'from-mark "(html" 'to-mark "))" 'color "red" 'face "bold") ) (main-text "The LAML counterpart" ) (annotation "") ) (source-program 'src "includes/initial-example/doc4.laml" 'slide-mode "external" 'book-mode "inline" 'background-color "white" (color-decorations (color-decoration 'from-mark "(define (normark" 'to-mark "))" 'color em-color-1 'face "bold" ) (color-decoration 'from-mark "(define complex" 'to-mark ")))" 'color em-color-2 'face "bold" ) (color-decoration 'from-mark "normark-url" 'to-mark "" 'color em-color-1 'face "bold" 'repetition "3") (color-decoration 'from-mark "complex" 'to-mark "" 'color em-color-2 'face "bold" 'repetition "3") (color-decoration 'from-mark "if" 'to-mark "" 'color em-color-3 'face "bold" 'repetition "2") (color-decoration 'from-mark "(kn)" 'to-mark "" 'color em-color-4 'face "bold" ) ) (main-text "An extended LAML counterpart") (annotation "") ) (cross-references (internet-reference 'href (includes-url "initial-example/doc4-simple.html") (main-text "The HTML rendering of the programmatic extension - simple") ) (internet-reference 'href (includes-url "initial-example/doc4-complex.html") (main-text "The HTML rendering of the programmatic extension - complex") ) ) ) (note-page 'id "mirror-section" (section-title "The HTML Mirrors") ) (define laml-color (rgb-color-encoding (make-color 209 209 163))) (define html-color (rgb-color-encoding (make-color 206 206 255))) (note-page 'id "mirroring1" (title (main-text "Mirroring of HTML (1)") (annotation "") ) (point (main-text (con "Attributes are handled by simulated keyword parameters" (p) "Textual content is passed as quoted strings" (p) "There is white space between content strings unless explicitly suppressed" ) ) (annotation "" ) 'margin-bottom "5em" ) (source-program 'src "includes/mirror-examples/basic-rule-1.laml" 'slide-mode "inline" 'book-mode "inline" 'background-color laml-color 'margin-bottom "3em" (main-text "An illustration of the most basic mirror rules of LAML" ) ) (source-program 'src "includes/mirror-examples/basic-rule-1-res.html" 'slide-mode "inline" 'book-mode "inline" 'background-color html-color (main-text "The HTML counterpart" ) ) (index-words ) ) (note-page 'id "mirroring2" (title (main-text "Mirroring of HTML (2)") (annotation "") ) (point (main-text "Instead of specifying where to add white space we tell where to suppress it" ) (annotation "" ) 'margin-bottom "6em" ) (source-program 'src "includes/mirror-examples/rule4-a.laml" 'slide-mode "inline" 'book-mode "inline" 'from-mark "(p" 'to-mark "\".\")" 'background-color laml-color 'margin-bottom "3em" (color-decorations (color-decoration'from-mark "_" 'to-mark ""'color "red" 'face "bold" 'repetition "4" ) ) (main-text "Illustration of white space suppression" ) (annotation "" ) ) (source-program 'src "includes/mirror-examples/rule4-a-res.html" 'slide-mode "inline" 'book-mode "inline" 'background-color html-color (main-text "The HTML counterpart" ) (annotation "" ) ) (index-words ) ) (note-page 'id "mirroring3" (title (main-text "Mirroring of HTML (3)") (annotation "") ) (point (main-text "Lists of contents and lists of attributes are processed recursively and spliced together with their context" ) (annotation "" ) 'margin-bottom "3em" ) (source-program 'src "includes/mirror-examples/rule5.laml" 'slide-mode "inline" 'book-mode "inline" 'from-mark "(body" 'to-mark ") " 'background-color laml-color 'margin-bottom "3em" (color-decorations (color-decoration 'from-mark "(list " 'to-mark ")" 'color "red" 'face "bold" 'repetition "3" ) (color-decoration 'from-mark "contents" 'to-mark "" 'color "blue" 'face "bold" 'repetition "2" ) (color-decoration 'from-mark "attributes" 'to-mark "" 'color "blue" 'face "bold" 'repetition "2" ) ) (main-text "Passing of attribute lists and lists of textual contents" ) (annotation "" ) ) (source-program 'src "includes/mirror-examples/rule5-res.html" 'slide-mode "inline" 'book-mode "inline" 'background-color html-color (main-text "The HTML counterpart" ) (annotation "" ) ) (cross-references 'margin-top "3em" (internet-reference 'href (includes-url "mirror-examples/rule5.html") (main-text "The resulting HTML page") ) ) (index-words ) ) (note-page 'id "mirroring4" (title (main-text "Mirroring of HTML (4)") (annotation "") ) (point (main-text (con "CSS attributes and HTML attributes are uniformly specified" (p) "CSS attributes are prefixed with " (kbd "css:") ) ) (annotation "" ) 'margin-bottom "6em" ) (source-program 'src "includes/mirror-examples/rule6-a.laml" 'slide-mode "inline" 'book-mode "inline" 'from-mark "(em" 'to-mark ")" 'background-color laml-color 'margin-bottom "3em" (color-decorations (color-decoration 'from-mark "'css:background-color" 'to-mark "\"yellow\"" 'color "red" 'face "bold" ) (color-decoration 'from-mark "'class" 'to-mark "\"c1" 'color "blue" 'face "bold" ) ) (main-text "Using CSS attributes together with HTML attributes" ) (annotation "" ) ) (source-program 'src "includes/mirror-examples/rule6-a-res.html" 'slide-mode "inline" 'book-mode "inline" 'background-color html-color (main-text "The HTML counterpart" ) (annotation "" ) ) (index-words ) ) (note-page 'id "html-mirror" 'drop "true" (title (main-text "The HTML mirrors") (annotation "") ) (point (main-text (con "An HTML mirror maps each HTML element to a named function in Scheme" (p) "An HTML mirror is automatically derived from a DTD" ) ) (annotation "" ) ) (items (item (main-text "Properties:" ) (annotation "" ) (items (item (main-text (con "Generates " (b "well-formed") " and " (b "valid") " HTML documents") ) (annotation "" )) (item (main-text (con "Prevents accidental emission of " (b (html-protect "'<'")) " and " (b (html-protect "'>'")) " as part of the textual contents") ) (annotation "" )) (item (main-text "The mirror functions return abstract syntax trees which can be rendered as 'HTML text'" ) (annotation "" )) (item (main-text "Supports optional pretty printing of the resulting HTML code" ) (annotation "" ))))) (index-words ) ) (note-page 'id "html-mirror" (title (main-text "Properties of the HTML mirrors") (annotation "") ) (point (main-text (con ; "An HTML mirror maps each HTML element to a named function in Scheme" (p) "An HTML mirror is automatically derived from a DTD" ) ) (annotation "" ) ) (items (item (main-text (b "Well-formed and valid documents") ) (items (item (main-text "Guaranties generation of well-formed and valid HTML documents" )))) (item (main-text (b "Structural document representation") ) (items (item (main-text "The mirror functions return" (em "abstract syntax trees") "which can be rendered as 'HTML text'" )))) (item (main-text (b "HTML layout") ) (items (item (main-text "Supports optional" (em "pretty printing") "of the resulting HTML code" )))) (item (main-text (b "Convenient rendering of reserved HTML characters") ) (items (item (main-text (b "'<'") "and" (b "'>'") "are rendered as the corresponding character entities" ))))) (index-words ) ) (note-page 'id "docstyles-sec" (section-title "Document styles") ) (note-page 'id "docstyles" (title (main-text "Document styles") (annotation "") ) (point (main-text "LAML supports a number of domain specific languages called document styles" ) ) (items 'margin-bottom "4em" (item (main-text (b "From a set of abstractions to a language") ) (items (item (main-text "A coherent set of functions can be considered as a new language" )))) (item (main-text (b "Examples") ) (items (item (main-text "Software manuals, questionnaires, lecture notes, course home pages, scientific papers" )))) (item (main-text (b "Example in the paper") ) (items (item (main-text "A quiz style" )))) ) (point 'margin-top "5em" (main-text "It is attractive to bring the document styles as close as possible to XML" ) (annotation "" ) ) (index-words ) ) (note-page 'id "laml-section" 'drop "true" (section-title "The LAML System") ) (note-page 'id "laml" 'drop "true" (title (main-text "The LAML System") (annotation "") ) (point 'margin-bottom "3em" (main-text "LAML = Scheme + The HTML mirrors + The LAML document styles" ) (annotation "" ) ) (items (item (main-text "LAML fundamentals:" ) (annotation "" ) (items (item (main-text "The Scheme programming language itself" ) (annotation "" )) (item (main-text "The mirrors of HTML" ) (annotation "" )) (item (main-text "A number of useful libraries" ) (annotation "" )) (item (main-text "A number of LAML document styles" ) (annotation "" )) (item (main-text "A number of LAML tools" ) (annotation "" )) (item (main-text "An Emacs Environment for practical use of LAML" ) (annotation "" ))))) (index-words ) ) (note-page 'id "xml-in-laml" (title (main-text "XML in LAML") (annotation "") ) (point (main-text "It is attractive to mirror XML languages in Scheme along the same lines as HTML" ) (annotation "" ) ) (items (item (main-text (b "Derived from a DTD") ) (items (item (main-text "An XML mirror in Scheme can be produced almost automatically from a DTD" )))) (item (main-text (b "Validating") ) (items (item (main-text "The mirror functions do full document validation 'on the fly'" )))) (item (main-text (b "Name spaces") ) (items (item (main-text "Prepared to deal with overlapping name spaces at the Scheme level" )))) (item (main-text (b "Action procedures") ) (items (item (main-text "Selected XML elements can be specified to initiate an action (transformation)" )))) ) ) (define demo-end-mark "; end xml-in-laml") (note-page 'id "xmlinlaml-leno" (title (main-text "LENO: An XML-in-LAML example language" ) (annotation "We here give an example of an XML-in-LAML language including a study of the concrete document representation" ) ) (point 'margin-top "4em" (main-text "The document source of these slides is written in an XML-in-LAML language called LENO" ) ) (items 'margin-bottom "4em" (item (main-text (b "Produces complex material") ) (items (item (main-text "Heavily interlinked pages with multiple views of the materials" )))) (item (main-text (b "Multiple author interfaces") ) (items (item (main-text "LENO supports both an original primitive Scheme interface, XML-in-LAML, and XML") (annotation "For this presentation we have used the XML-in-LAML interface.") ))) (item (main-text (b "Relatively mature") ) (items (item (main-text "We have used LENO to produce E-learning material the last four years" ))))) (source-program 'src "www2002.laml" 'from-mark "(note-page 'id \"xmlinlaml-leno\"" 'to-mark demo-end-mark 'slide-mode "external" 'book-mode "inline" (color-decorations (color-decoration 'from-mark "note-page" 'to-mark "" 'color "red" 'face "bold" ) (color-decoration 'from-mark "title" 'to-mark "" 'color "blue" 'face "bold" ) (color-decoration 'from-mark "point" 'to-mark "" 'color "blue" 'face "bold" 'repetition "1") (color-decoration 'from-mark "items" 'to-mark "" 'color "blue" 'face "bold" 'repetition "4") (color-decoration 'from-mark "source-program" 'to-mark "" 'color "blue" 'face "bold" ) (color-decoration 'from-mark "item " 'to-mark "" 'color "brown" 'face "bold" 'repetition "6") (color-decoration 'from-mark "main-text" 'to-mark "" 'color "brown" 'face "bold" 'repetition "10") (color-decoration 'from-mark "annotation" 'to-mark "" 'color "brown" 'face "bold" 'repetition "2") ) (main-text "The LAML document source of this page" ) ) ) ; end xml-in-laml (note-page 'id "reflections-sec" (section-title "Reflections and conclusions") ) (note-page 'id "reflections" (title (main-text "Reflections") (annotation "") ) (items 'margin-bottom "4em" (item (main-text (b "The programming paradigm") ) (annotation "" ) (items (item (main-text "Good fit between" (em "functional programming") "and" (em "descriptive markup") ) (annotation "" )) (item (main-text "Similar work is well-represented in the functional programming communities" ) (annotation "" )) (item (main-text (em "Imperative programming") "is less attractive in a programmatic authoring context" ) (annotation "" )))) (item (main-text (b "Mixing fragments of markup and programs") ) (annotation "" ) (items (item (main-text "Less powerful than a solution that involves a single linguistic framework" ) (annotation "" )) (item (main-text "Aesthetically unpleasing" ) (annotation "" )) ))) (point (main-text "We have gone for inclusion of the" (em "less powerful language") "in the" (em "more powerful language") ) (annotation "" ) ) (index-words ) ) (note-page 'id "conclusions" (title (main-text "Conclusions") (annotation "") ) (items (item (main-text (b "LAML usage") ) (annotation "" ) (items (item (main-text "I have used LAML for all my generated documents and all server-side programs the last four years" ) (annotation "" )) (item (main-text "LAML has been downloaded numerous times and used at least for educational purposes" ) (annotation "" )) )) (item (main-text (b "The programming language Scheme") ) (annotation "" ) (items (item (main-text "A Lisp language can deliver the necessary flexibility and power for support of programmatic authoring" ) (annotation "" )) ))) (point 'margin-top "6em" (main-text "LAML is available as free software from the LAML home page at" (kbd "http://www.cs.auc.dk/~normark/laml/") ) (annotation "" ) ) (index-words ) ) (end-notes)