<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="chapterNotes.xsl"?>
<!DOCTYPE chapterNotes [
 <!ENTITY e--n "&#8211;">
 <!ENTITY e---m "&#8212;">
 <!ENTITY nbsp "&#160;">
 <!ENTITY  oe  "&#x00F6;">

 <!ELEMENT table-of-contents  ( chapters, appendices ) >

 <!ELEMENT chapters ( chapter* ) >

 <!ELEMENT appendices ( appendix* ) >

 <!ELEMENT chapter ( chaptitle,  sections ) >
 <!ATTLIST chapter num NMTOKEN #REQUIRED >

 <!ELEMENT appendix ( chaptitle,  sections* ) >
 <!ATTLIST appendix num NMTOKEN #REQUIRED >


 <!ELEMENT chaptitle ( #PCDATA ) >

 <!ELEMENT sections ( section+ ) >

 <!ELEMENT section ( secttitle,  subs* ) >
 <!ATTLIST section num NMTOKEN #REQUIRED >


 <!ELEMENT secttitle ( #PCDATA ) >

 <!-- below this line, added for chapter notes -->

 <!ELEMENT subs ( heading , 
           ( notes | ol | p | thingsToKnow | ul | pre )+ ) >

 <!ATTLIST subs num NMTOKEN #REQUIRED >


 <!ELEMENT heading  ( #PCDATA | code )*  >


 <!ELEMENT code ( #PCDATA ) >

 <!ELEMENT em ( #PCDATA ) >

 <!ELEMENT note ( #PCDATA | code | em | p )* >
 <!ELEMENT notes ( note+ ) >

 <!ELEMENT ol ( li+ ) >

 <!ELEMENT li ( #PCDATA | code | em )* >

 <!ELEMENT p ( #PCDATA | code | em | term )* >
 <!ATTLIST p sp NMTOKEN #IMPLIED >

 <!ELEMENT thingsToKnow ( ttk+ ) >
 <!ELEMENT ttk ( #PCDATA | code | em | sup )* >

 <!ELEMENT ul ( li+ ) >

 <!ELEMENT sup ( #PCDATA ) >
 <!ELEMENT term ( #PCDATA ) >
 <!ELEMENT pre ( #PCDATA ) >



]>



<chapter num="4"><chaptitle>Introduction to XHTML: Part 1</chaptitle>
<sections>
<section num="4.1"><secttitle>Introduction</secttitle>

<p>One of the most important discussions in this section is the last paragraph
on p. 81 about  separating <term>presentation</term> from <term>structure</term>.
Be sure to read over this pargraph, because I may ask a test question based
on this concept.  If there is anything in the paragraph you don't understand,
ask about it in lecture or via email.</p>

<thingsToKnow>
<ttk>XHTML is a <term>markup language</term>.</ttk>
<ttk>A key issue for XHTML is separating <term>presentation</term> from <term>structure</term>.</ttk>
<ttk>HTML often mixed (and still does mix) content, structure, and formatting.</ttk>
<ttk>XHTML 1.1 allows only the specification of content and structure, not formatting.</ttk>
<ttk>For XHTML documents, formatting should be specified via Cascading Style Sheets (CSS).</ttk>
</thingsToKnow>



</section> <!-- section 4.1, Introduction -->

<section num="4.2"><secttitle>Editing XHTML</secttitle>

<thingsToKnow>
<ttk>We edit documents in <term>source-code form</term>.</ttk>
<ttk>We use a <code>text editor</code> to edit HTML documents (e.g. notepad or wordpad on Windows)</ttk>
<ttk>vi and emacs are text editors commonly used on Unix systems.</ttk>
<ttk>XHTML documents have filenames ending in .htm or .html</ttk>
<ttk>Web servers are machines that store XHTML documents and make them available over the Internet.</ttk>
</thingsToKnow>

</section>

<section num="4.3"><secttitle>First XHTML Example</secttitle>

<p>Be sure to look over the first XHTML example on p. 82.  Most things about
this example are the same as the examples we've been seeing in class.  A
few things are different.</p>

<p>First, the following appears at the top of the file:</p>

<pre>
<![CDATA[
<?xml version = "1.0?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1/EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
]]>
</pre>

<p>
The text points out that the meaning of these lines is explained in Chapter&nbsp;20.
Specificaly, the first line is explained on p.635, and the second line is explained
(in part) on p. 637.  </p>

<p>Here's a short explanation of this part:</p>
<pre>
<![CDATA[
<?xml version = "1.0?>
]]>
</pre>

<p>This says that the document conforms to the XML version 1.0 standard, which is a "superset"
of XHTML.  </p>


<p>When we say that XHTML is a superset of XML, we mean that:
 <ul>
  <li>everything that is XHTML is also XML</li>
  <li>not everything that is XML is necessarily XHTML</li>`
 </ul>
</p>

<p>XML is a more general standard than XHTML, and is used for structuring all
kinds of data. In fact, these reading notes start out in XML, and get converted
to XHTML by your web browser.  XML allows users to define their own tags for 
customized applications, or use predefined tags like those in XHTML. Chapter 20
has lots more information on XML if you are interested.</p>


<p>For conforming with standards, we also see an attribute on the html element
called xmlns, which stands for "XML namespace".  Again, the detailed discussion
is in Chapter 20; the short version is that namespaces allow lots of folks to
come up with names for tags without worrying that two folks will use the same
tag name for different purposes.   If this happens (by accident, or on purpose),
the namespace attribute and some special codes can be used to make sure that
the meaning of the XHTML code (or XML code) is clear.</p>


<pre>
<![CDATA[
<html xmlns="http://www.w3.org/1999/xhtml">
]]>
</pre>


<thingsToKnow>
<ttk> Use <![CDATA[ <!-- ]]> and  <![CDATA[ --> ]]> to mark comments in XHTML.  </ttk>
<ttk> Know the html, head, title and body tags.  </ttk>
<ttk> Know that the head element may contain style sheets and scripts, as well as the title element.  </ttk>

<ttk> Know the terms tag, element, open tag, close tag, attributes and nested elements. </ttk>
<ttk> Tags in XHTML must be properly nested (see Common Programming Error 4.3).         </ttk>
</thingsToKnow>


</section>

<section num="4.4"><secttitle>W3C XHTML Validation Service</secttitle>

<thingsToKnow>
 <ttk>A validation service can be used to ensure that a website is syntactically correct, i.e.
     that it follows all the rules of XHTML.</ttk>

  <ttk>Most browsers are very forgiving of syntax errors in HTML or XHTML code.  However, XHTML
    and browsers themselves will probably only grow more complex over time.  The best way to
    sure your code will work properly in many different browsers is to be sure that it follows
    the standards exactly.
  </ttk>
  <ttk>validator.w3.org is one web site that can be used to validate XHTML.</ttk>
</thingsToKnow>

</section>
<section num="4.5"><secttitle>Headers</secttitle></section>
<section num="4.6"><secttitle>Linking</secttitle></section>
<section num="4.7"><secttitle>Images</secttitle></section>
<section num="4.8"><secttitle>Special Characters and More Line Breaks</secttitle></section>
<section num="4.9"><secttitle>Unordered Lists</secttitle></section>
<section num="4.10"><secttitle>Nested and Ordered Lists</secttitle></section>
<section num="4.11"><secttitle>Web Resources</secttitle></section>
</sections>
</chapter>


