<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_plain.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="m9002">
  <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">XML Basics</name>
  <metadata xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
  <md:version xmlns:bib="http://bibtexml.sf.net/">2.23</md:version>
  <md:created xmlns:bib="http://bibtexml.sf.net/">2000/05/18</md:created>
  <md:revised xmlns:bib="http://bibtexml.sf.net/">2008/05/10 10:54:18.221 GMT-5</md:revised>
  <md:authorlist xmlns:bib="http://bibtexml.sf.net/">
      <md:author xmlns:bib="http://bibtexml.sf.net/" id="selc">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Sarah</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Coppin</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">coppin@alumni.rice.edu</md:email>
    </md:author>
      <md:author xmlns:bib="http://bibtexml.sf.net/" id="brentmh">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Brent</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">Michael</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Hendricks</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">brentmh@rice.edu</md:email>
    </md:author>
      <md:author xmlns:bib="http://bibtexml.sf.net/" id="cbearden">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Charles</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">F.</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Bearden</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">cbearden@rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist xmlns:bib="http://bibtexml.sf.net/">
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="brentmh">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Brent</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">Michael</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Hendricks</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">brentmh@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="cbearden">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Charles</md:firstname>
      <md:othername xmlns:bib="http://bibtexml.sf.net/">F.</md:othername>
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Bearden</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">cbearden@rice.edu</md:email>
    </md:maintainer>
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="jago">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Adan</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Galvan</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">agalvan@gmail.com</md:email>
    </md:maintainer>
    <md:maintainer xmlns:bib="http://bibtexml.sf.net/" id="charlet">
      <md:firstname xmlns:bib="http://bibtexml.sf.net/">Charlet</md:firstname>
      
      <md:surname xmlns:bib="http://bibtexml.sf.net/">Reedstrom</md:surname>
      <md:email xmlns:bib="http://bibtexml.sf.net/">charlet@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist xmlns:bib="http://bibtexml.sf.net/">
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">attribute</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">entity</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">nesting</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">unicode</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">valid</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">well-formed</md:keyword>
    <md:keyword xmlns:bib="http://bibtexml.sf.net/">xml</md:keyword>
  </md:keywordlist>

  <md:abstract xmlns:bib="http://bibtexml.sf.net/">This module describes XML (eXtensible Markup Language) and the rules that govern its usage.  It also explains what a well-formed and valid document is.</md:abstract>
</metadata>

  <content xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
    
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="whatxml">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">What is XML?</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pa1">
	The eXtensible Markup Language (<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">XML</term>) is a
	<term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">meta-markup language</term> defined by the <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://www.w3.org">World Wide Web Consortium
	(W3C)</link>.  It is not strictly a markup language itself,
	but rather a set of rules for creating markup languages.  For
	our purposes a <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">markup language</term> is any language
	(HTML, for example) that uses tags surrounding text to convey
	information such as content or format.  <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu/cnxml">CNXML</link>, the markup
	language used by the <link xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" src="http://cnx.rice.edu">Connexions Project</link> is an
	example of a language written in XML.  There are many other
	examples at the W3C site.  Here is an example of some markup
	in CNXML.
      </para>
      <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="ex1">
      <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block">
<![CDATA[<para>
  This is a paragraph in <term>CNXML</term>.  Notice that the markup
  contains tags that express the meaning of the text.
</para>]]>
      </code>
      </example>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pa5"><code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;para&gt;</code> and
	<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;/para&gt;</code> are the tags that 
	enclose the text.  In XML, tags are always marked by angle
	brackets (also known as <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;</code> and
	<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&gt;</code>).  <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Tags</term> generally come
	in pairs.  An opening tag will look like
	<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;tagname&gt;</code>.  A closing tag will look
	like <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;/tagname&gt;</code>, with a
	<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">/</code> preceding the tag name.
      </para>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pa2">
	XML allows the separation of presentation from content.  For example, HTML
	has tags such as <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;u&gt;</code> and
	<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;i&gt;</code>, which underline and italicize
	text respectively.  This does not express content information,
	only formatting.  XML allows you to define your own language
	of tags to represent content.  You could create a tag called
	<code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;book&gt;</code> to represent book titles,
	and create a stylesheet (a separate formatting document), that
	says that every <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;book&gt;</code> tag should
	be italicized or underlined.  Then when you want to change the
	presentation of that type of content, you just change one
	small part of the stylesheet.  Also, if you make tags that
	convey the content of the document, you can enable better
	searching.  For example, you might look for the author of a
	document by looking at the author tag.
      </para>
    </section>


    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="xmlrules">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Well-formed XML</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pa3">XML has a few rules that apply to all of its
      languages, including CNXML. If a document satisfies these
      rules, then it is <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">well-formed</term>.  XML documents are
      required to be well-formed.
	<list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="threerules">
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
	    Every tag that is opened must be closed.  An opening tag
	    looks like <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;module&gt;</code> and a
	    closing tag looks like
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;/module&gt;</code>.  There is a
	    shortcut.  If your tag contains no other tags (referred to
	    as an <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">empty tag</term>), then you can can type a /
	    before the end of the opening tag and delete the closing
	    tag.  For example,
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;media&gt; &lt;/media&gt;</code>
	    can be abbreviated
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;media/&gt;</code>.
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
	    Tags must be nested within each other.  So,
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;b&gt;red &lt;i&gt;and&lt;/i&gt;
	    blue&lt;/b&gt;</code> is fine, but
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;b&gt;red &lt;i&gt;and&lt;/b&gt;
	    blue&lt;/i&gt;</code>is incorrect because the
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;b&gt;</code> and
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;i&gt;</code> tags have overlapping
	    content.
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
	    You must put either single or double quotes around an
	    attribute value.  An <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">attribute</term> is some sort
	    of information that is associated with a tag and is listed
	    inside of the tag itself.  For example,
	  <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">
	    &lt;module id="m0001"&gt;
	  </code>
	  and
	  <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">
	    &lt;module id='m0001'&gt;
	  </code>
	  are fine, but
	  <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">
	    &lt;module id=m0001&gt;
	  </code>
	  is incorrect.
	  </item>
	  
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
	    You can also choose to start every document with an
	    <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">XML declaration</term>.  If you do use the XML
	    declaration, then it has to be the very first thing in the
	    file.  It cannot even be preceded by whitespace.  It is
	    not considered to be a tag.  The XML declaration is as
	    follows.  <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;?xml version="1.0"?&gt;</code>
	    You can also include other information such as the
	    encoding of the document or whether the document depends
	    on other files or not.
	  </item>
	  <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">
	    There must be one tag that contains all of the other tags.  For
	    example in xhtml <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;html&gt;</code> and
	    <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="inline">&lt;/html&gt;</code> must surround all of
	    the other tags.  There are some things that are included
	    at the top of the document that are not tags and that are
	    not included with the tags.  The XML declaration is an
	    example of this.
	  </item>	  
	</list>
      </para>
    </section>


    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="valid">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Valid XML</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pvalid">
	It is possible to define a set of rules that apply to all of
	the tags in a particular XML language.  These rules can be
	defined in a couple of different ways. The most common way is
	to use a <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">DTD</term> (Document Type Definition).  Any
	document which follows all of the rules for that language is
	called <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">valid</term>.  A document is not required to be
	valid in order to be XML.  However, it is generally a good
	idea.
      </para>
    </section>
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="entity-refs">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Entity References</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pent1">
XML uses several characters in special ways as part of its markup, in particular
the less-than symbol (<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&lt;</emphasis>),
the greater-than symbol (<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&gt;</emphasis>),
the double quotation mark (<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">"</emphasis>),
the apostrophe (<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">'</emphasis>),
and the ampersand (<emphasis xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;</emphasis>).
You've already seen examples of markup using the first four of those previously in this module.
But what if you need to these characters in your content, and you don't want them to be treated as part of the markup by XML processors?  You can use XML <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">entity references</term> for this purpose.  The XML Specification defines the following five entity references for use in any well-formed XML document:
        <list xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="entref-list" type="bulleted">
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"><code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;amp;</code> refers to an ampersand (&amp;)</item>
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"><code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;lt;</code> refers to a less-than symbol (&lt;)</item>
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"><code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;gt;</code> refers to a greater-than symbol (&gt;)</item>
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"><code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;quot;</code> refers to a double-quote mark (")</item>
          <item xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/"><code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;apos;</code> refers to an apostrophe (')</item>
        </list>
      </para>
      <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="exent2">
        <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pent2">
          Suppose you have a document with the following:
          <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block"><![CDATA[
      <para id="p1">The firm was known as Scrooge and Marley.</para>]]>
          </code>
          you could replace 'and' with the entity reference <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;amp;</code>:
          <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block"><![CDATA[
      <para id="p1">The firm was known as Scrooge &amp; Marley.</para>]]>
          </code>
  	<!-- An <term>entity</term> is a way to escape characters.
  	Entities always have the same basic form.  An entity will
  	start with an ampersand and end with a semicolon.  For
  	example, &amp;amp; will escape the &amp; character.  So if you
  	type &amp;amp; in the source file, you will see &amp; when you
  	view it in a browser.  There are several entities that are
  	predefined and will work in any XML file.  They are &amp;amp
  	(&amp;), &amp;lt (&lt;), &amp;gt (&gt;), &amp;quot
  	("), and &amp;apos (').  These are the same
  	entities that are defined for HTML.  In addition to these
  	basic symbols, you can define your own entities using a DTD.
  	These self defined entities can point to other symbols, or
  	they can be short cuts to a larger piece of text. -->
        </para>
      </example>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="pent3">All entity references outside the above five must be defined in a document type declaration, and they may only be used in documents that conform to that DTD.  Note that an entity reference always begins with <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;</code> and ends with <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">;</code>.
      </para>
    </section>
    <section xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="char-refs">
      <name xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Character References</name>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="cent1">
	You can also use any character defined in <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">Unicode</term> in an XML document by means of <term xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">character references</term>.
	Unicode is a project to define a unique code for every
	character in any human language. Unicode is very useful any
	time that you need to use a symbol that is not a part of
	ASCII.
      </para>
      <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="cent2">
        Character references in XML either begin with <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;#</code>, or they begin with <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;#x</code>, and they end with a semicolon <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">;</code>.  A character reference contains a representation of a Unicode code point: if it begins with <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;#</code>, then it contains a decimal representation of a Unicode code point; if it begins with <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;#x</code>, then it contains a hexidecimal representation of a Unicode code point.
      </para>
      <example xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="cent2-ex1">
        <para xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" id="cent2-ex1-p1">The hexidecimal representation of the Unicode code point for the small 'o' with a stroke is <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">00F8</code>, and the decimal representation for the same is <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">248</code>.  Therefore, the character references for the small 'o' with a stroke are <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;#x00F8;</code> and <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/">&amp;#248;</code>
        So you could write
          <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block"><![CDATA[
    <emphasis>The majestik m&#x00F8;&#x00F8;se</emphasis>]]>
          </code>
        or
          <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block"><![CDATA[
    <emphasis>The majestik m&#248;&#248;se</emphasis>]]>
          </code>
        or even 
          <code xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block"><![CDATA[
    <emphasis>The majestik m&#x00F8;&#248;se</emphasis>]]>
          </code>
        to get
          <quote xmlns:md="http://cnx.rice.edu/mdml/0.4" xmlns:bib="http://bibtexml.sf.net/" type="block">
    The majestik møøse
          </quote>
        </para>
      </example>
	<!-- Unicode entities have an extra # sign.  So they look like:
	&amp;#134;.  Or if the code is in hexadecimal, there is also
	an extra x causing them to look like: &amp;#x03C0;. -->
    </section>
  </content>
</document>
