
Big picture:
<h3>xexpr, xml, html</h3>
Information has structure.
For instance, perhaps
Picture-infos consists of a caption and a filename (ending in ".jpeg" or ".gif");
and in turn
a gallery consists of a title, and a list of picture-infos.
We have seen how to represent this data in our programs,
but non-programmers also want to represent such information.
X-expressions and xml are two different ways of doing this.
For example in xml we might have
<pre>
&lt;gallery&gt;
  &lt;title&gt;Me at the Britney Spears Concert&lt;/title&gt;
  &lt;picture&gt;
    &lt;filename&gt;pict01.jpg&lt;/filename&gt;
    &lt;caption&gt;Waiting in line for a Pepsi.&lt;/caption&gt;
    &lt;/picture&gt;
  &lt;picture&gt;
    &lt;filename&gt;pict07.jpg&lt;/filename&gt;
    &lt;caption&gt;Waiting in line for &lt;em&gt;another&lt;/em&gt; Pepsi.&lt;/caption&gt;
    &lt;/picture&gt;
  &lt;picture&gt;
    &lt;filename&gt;pict19.jpg&lt;/filename&gt;
    &lt;caption&gt;Waiting in line for the bathroom.&lt;/caption&gt;
    &lt;/picture&gt;
  &lt;/gallery&gt;
</pre>
A few notes on this:
<ul>
<li>
The structure of the data is indicated by matching start and end tags
 (such as <tt>&lt;picture&gt;...&lt;/picture&gt;</tt>).
</li>
<li>The word "another" is inside an <tt>em</tt> tag;
we happen to use this tag to indicate "emphasized text".
</li>

<li>In a sense, these tags are just made-up -- that is,
what is meant by "gallery" is in my head, and may not be whatever
somebody else thinks a gallery is.
In order to 
</li>
<li>
The white space (blanks, tabs, returns) have no meaning (beyond making
it easy for humans to scan).
</li>
</ul>

This same information is contained in this corresponding X-expression:
<pre>
(list 'gallery
      (list 'title "Me at the Britney Spears Concert")
      (list 'picture
            (list 'filename "pict01.jpg")
            (list 'caption "Waiting in line for a Pepsi."))
      (list 'picture
            (list 'filename "pict07.jpg")
            (list 'caption "Waiting in line for " (list 'em "another") " Pepsi."))
      (list 'picture
            (list 'filename "pict19.jpg")
            (list 'caption "Waiting in line for the bathroom.")))

;; Or, equivalently, using the quoted-list form:
;;
'(gallery (title "Me at the Britney Spears Concert")
          (picture (filename "pict01.jpg")
                   (caption "Waiting in line for a Pepsi."))
          (picture (filename "pict07.jpg")
                   (caption "Waiting in line for " (em "another") " Pepsi."))
          (picture (filename "pict19.jpg")
                   (caption "Waiting in line for the bathroom."))
</pre>
<ul>
<li>

<p>
Note the similarity between xml and scheme lists:
In scheme there are only three types of parens:
round <tt>(</tt>,<tt>)</tt>
and square <tt>[</tt>,<tt>]</tt>
and squirrely <tt>{</tt>,<tt>}</tt>;
these can all nest, and each open must match its close.
<comment>
(You can use these parens interchangeably.)
<comment>
</p>

<p>
In xml, it's the same, except there are lots of types of parens
(which take more than a single character to write):
there're gallery-parens <tt>&lt;gallery&gt;</tt>,<tt>&lt;/gallery&gt;</tt>
and em-parens <tt>&lt;em&gt;</tt>,<tt>&lt;/em&gt;</tt>, etc.
As you'd expect,
these parens can nest, and each open must match its close.
</p>

<p>
Xexpr is just a convention to represent this plethora of
parentheses inside of scheme:
we pretend that we have this plethora of parentheses:
we just insist that each list begin with a symbol
(representing name of the xml parentheses -- or "tag").
We won't repeat that symbol at the closing paren,
since it's implicit.
</p>



<p>
A document consists of paragraphs;
paragraphs are a list of words, links, and emphasized sections.
Furthermore, links themselves are words (that can be clicked on)


<ul>
<li>An unordered list is a list of individual items.
</li>
<li>A document is a list of paragraphs; paragraphs can themselves
contain unordered lists.
</li>
</ul>
<p>
Xml, "extensible markup language", is a way to express structure, in regular text.
For instance:
<pre>
&lt;p&gt;
This sentence is a list of words,
&lt;em&gt;some of which are meant to be empahasized!&lt;/em&gt;
Even &lt;em&gt;sub&lt;\em&gt;parts of words can be emphasized.
We indicate what to emphasize by placing it between matching "tags",
in this case the tag "em".
</p>


<pre>
It is just common convention (called "html") to use
&lt;/p&gt; and &ltp&gt;
to delimit paragraphs.
In fact, this entire section is a list of paragraphs.
We indicate 



This text has structure -- it is a sequence of
paragraphs.
&lt;/p&gt;

&lt;p&gt; Each paragraph is delimited between "p" tag
and its matching closing tag, "/p", as you
see.  Blank lines don't&lt;/p&gt;



<pre>
An ordered list, "ol", is a structure containing
a list of list-items.
&lt;ol&gt;
&lt;li&gt; this is the first item. &lt;/li&gt;
&lt;li&gt; this is the second. &lt;/li&gt;
&lt;li&gt; note that the actual numbering of the items
is not included; that's implicit. &lt;/li&gt;
&lt;li&gt; 

</pre>
Usually, you'd use 



