Lecture overview
Keyboard shortcut: 'u'  Previous page
Keyboard shortcut: 'p'  Next page
Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide
Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Slide 17 : 42
Problems with nested markup

When we compare an SGML family language with a Lisp family programming language we find some major syntactical differences. The observation about semi-constant strings is one of the most important

There is a fundamental problem of nested document fragments that must be dealt with

  <p> 
    A text with a 
    <a href="subsection/sec1.html">link</a> 
    to a <b>subsection</b>
  </p>

This is a typical HTML/XML fragment

  (p
    "A text with a 
     (a "link" 'href "subsection/sec.html")
     to a (b "subsection")
    ")

Here we attempt to use a semi-constant string in Scheme. This does actually not make sense.

  (p
   (string-append
     "A text with a " 
     (a "link" 'href "subsection/sec.html")
     " to a " (b "subsection")))

Here we see the solution we use in all our examples. This uses a plain Scheme programming approach.

We have dropped the blue approach in favor of the brown approach.
The Emacs environment supports the embedding of a selected substring in a Scheme function.