Provide whitespace?, filter-out-whitespace p, em, img gallery (title), picture (has src=, , <caption>) advanced: comment; use map-append. <p> Fill out feedback sheets. </p> <h2>Digression: XML</h2> <p> - Structured data; strings fail. (colon separated; backslash separated; tab-separated; newlines significant?, no standard) </p> <p> A few years ago, a standard has been converged upon: "Xml" ("extensible markup language"). It encodes structure into a string by <em>marking it up</em> with <em>tags</em>. <strong>We will not need to know XML for this lab</strong>, but we'll be dealing with an scheme equivalent of XML; there is an optional exercise at the end of the lab where we'll convert between the scheme code and XML files on disk. </p> <p> Here are some examples of XML; note how every tag is opened and then closed. (What the tags <em>mean</em> is up to whoever reads the file.) <ul> <li> <pre> <gallery> <title>Welcome to the Comp210 House of Horrors</title> <caption>This gallery contains a title and a caption but nothing else.</caption> </gallery> </pre> This is like a structure containing two strings. Every open tag has a matching close, and that tags (like parentheses) must be properly nested. </li> <li> How did we "know" THAT `HH Tags can be anything at all: remember that including </li> <li> Here is a gallery tag which contains not just a title and caption, but also a couple of pictures: <pre> <gallery> <title>Welcome to the Comp210 House of Horrors</title> <caption>This gallery has two pictures.</caption> <picture src="http://www.owlnet.rice.edu/~comp210/Gifs/smiley.gif"> <caption> the first day of class.</caption> </picture> <picture src="http://www.owlnet.rice.edu/~comp210/Gifs/smiley.gif"> <caption> the last day of class.</caption> </picture> </gallery> </pre> So we see that within a gallery tag, we can have any number of other tags. We introduced one further thing here, <i>attributes</i>: within each picture (sub)tag, there is a "src" attribute. </li> <li> <pre> <p>This is a paragraph with <em>emphasized</em> text, if you interpret these tags as html.</p> </pre> </li> <li> <pre> <p>A detail: What if you want a less-than character in your text, and don't want it to be confused with an open-tag? To get around that, there are three important <i>entities</i>: &lt; for less-than, &gt; for greater-than, and &amp; for ampersand. </p> </pre> </li> <li> Web pages are written in xml, where the tags are interpreted as ("html", You can go to your browser and select a menu option "view source", and you can actually see the raw xml which is being displayed as your current web page. </li> </p> - Digression: xml: A way of encoding structured information as marked-up text. (Really, it's like scheme structures, (Really, xml are equivalent to slightly verbose versions of scheme lists, which have been around since 1965...) In DrScheme, select "insert xml box...", and paste in the following: <ul> <li> <pre> <p>This is a paragraph with <em>emphasized</em> text, if you interpret these tags as html.</p> </pre> </li> <li> <pre> <p>A detail: What if you want a less-than character in your text, and don't want it to be confused with an open-tag? To get around that, there are three important <i>entities</i>: &lt; for less-than, &gt; for greater-than, and &amp; for ampersand. </p> </pre> </li> <li> Web pages are written in xml, where the tags are interpreted as ("html", You can go to your browser and select a menu option "view source", and you can actually see the raw xml which is being displayed as your current web page. </li> </ul> data def'n - (1) html-ify - (2)