strictly formatting fixes to the reference; no new content
authoradam <adam@megacz.com>
Thu, 25 Mar 2004 12:22:05 +0000 (12:22 +0000)
committeradam <adam@megacz.com>
Thu, 25 Mar 2004 12:22:05 +0000 (12:22 +0000)
darcs-hash:20040325122205-5007d-d1015f5cf6a6937b049b97e9e2314252e397729d.gz

doc/reference.xml

index e0365aa..15b8da4 100644 (file)
     you are not familiar with ECMAscript, some reference materials are
     provided in <link appendix="G"/>
     
     you are not familiar with ECMAscript, some reference materials are
     provided in <link appendix="G"/>
     
-    The <i>shoehorn sequence</i> (how the Ibex Core gets onto the
-    client's computer, and how it knows where to download the initial .ibex
-    from) is not described in this document, since it will be different
-    for every platform that Ibex is ported to.
+    The <i>wildebeest sequence</i> (how the Ibex Core gets onto the
+    client's computer, and how it knows where to download the initial
+    <t>.ibex</t> from) is not described in this document, since it
+    will be different for every platform that Ibex is ported to.
     
     If you need to use or rely on some behavior you notice in the Ibex
     Core, but which is not clearly defined here, please post to <link
     url="http://lists.ibex.org/listinfo/users" text="the users mailing list"/>.
     
     
     If you need to use or rely on some behavior you notice in the Ibex
     Core, but which is not clearly defined here, please post to <link
     url="http://lists.ibex.org/listinfo/users" text="the users mailing list"/>.
     
-  </section>
-
-<!-- ----------------------------------------------------------------------- -->
-<section title="Key Concepts">
-
-  <section title="Definitions">
-    
+  <section title="Key Concepts">
+  
     <definition term="The Core">
          Ibex itself; the native code (or Java bytecode) that runs on
     <definition term="The Core">
          Ibex itself; the native code (or Java bytecode) that runs on
-         the client.  This term does not include the <i>shoehorn</i>
+         the client.  This term does not include the <i>wildebeest</i>
          or the <i>UI</i></definition>
          or the <i>UI</i></definition>
-
+  
     <definition term="The UI / The Application">
          a set of files (mostly XML, JavaScript, and PNG images)
          bundled up in a zip archive, ending with the "..ibex"
     <definition term="The UI / The Application">
          a set of files (mostly XML, JavaScript, and PNG images)
          bundled up in a zip archive, ending with the "..ibex"
          we'll refer to this as the ".ibex" to be clear that we're
          talking about the actual zip archive, rather than its visual
          appearance when rendered on the screen.</definition>
          we'll refer to this as the ".ibex" to be clear that we're
          talking about the actual zip archive, rather than its visual
          appearance when rendered on the screen.</definition>
-
+  
     <definition term="The Server">
          We will use the term "the server" to refer to any other
          computer which the client makes XML-RPC or SOAP calls
          to. Note that it is possible for the client and server to be
          the same machine.</definition>
     <definition term="The Server">
          We will use the term "the server" to refer to any other
          computer which the client makes XML-RPC or SOAP calls
          to. Note that it is possible for the client and server to be
          the same machine.</definition>
-
-    <definition term="The Shoehorn">
+  
+    <definition term="The Wildebeest">
          this is a very small piece of code that is downloaded the
          first time a client uses Ibex. It downloads the Ibex core,
          verifies its signature, and launches it with the appropriate
          parameters indicating where to find the initial UI.  The
          this is a very small piece of code that is downloaded the
          first time a client uses Ibex. It downloads the Ibex core,
          verifies its signature, and launches it with the appropriate
          parameters indicating where to find the initial UI.  The
-         Shoehorn works differently on every platform, and is outside
+         Wildebeest works differently on every platform, and is outside
          the scope of this document.</definition>
          the scope of this document.</definition>
-
+  
     <definition term="put/write">
          In ECMAscript, when you change the value of a property on an
          object, you are <i>putting</i> to that property, or
          <i>writing</i> to it. For example, the ECMAscript expression
     <definition term="put/write">
          In ECMAscript, when you change the value of a property on an
          object, you are <i>putting</i> to that property, or
          <i>writing</i> to it. For example, the ECMAscript expression
-         "<tt>foo.bar = 5</tt>" <i>puts</i> the value 5 to the bar
+         "<t>foo.bar = 5</t>" <i>puts</i> the value 5 to the bar
          property on object foo.</definition>
          property on object foo.</definition>
-
+  
     <definition term="get/read">
          In ECMAscript, when you access the value of a property on an
          object, you are <i>getting</i> that property, or
          <i>reading</i> from it. For example, the ECMAscript
     <definition term="get/read">
          In ECMAscript, when you access the value of a property on an
          object, you are <i>getting</i> that property, or
          <i>reading</i> from it. For example, the ECMAscript
-         expression "<tt>return (3 + foo.bar)</tt>" <i>gets</i> the
+         expression "<t>return (3 + foo.bar)</t>" <i>gets</i> the
          value of bar property on object foo and then adds 3 to it
          before returning the result.</definition>
          value of bar property on object foo and then adds 3 to it
          before returning the result.</definition>
-
+  
     <definition term="JavaScript">
         We will use the terms JavaScript and ECMAScript
         interchangeably in this document.  The Ibex interpreter is not
         completely ECMA-compliant, however (see <link
         appendix="C"/> for details).  </definition>
     <definition term="JavaScript">
         We will use the terms JavaScript and ECMAScript
         interchangeably in this document.  The Ibex interpreter is not
         completely ECMA-compliant, however (see <link
         appendix="C"/> for details).  </definition>
+  </section>
+</section>
     
     
-    </section>
+<section title="Surfaces">
 
 
-  <section title="Surfaces">
-
-    Each top-level window in an Ibex UI is called a
-    <i>surface</i>. There are two kinds of surfaces: <i>frames</i>, which
-    usually have a platform-specific titlebar and border, and
-    <i>windows</i>, which never have any additional platform-specific
-    decorations.
+  Each top-level window in an Ibex UI is called a
+  <i>surface</i>. There are two kinds of surfaces: <i>frames</i>,
+  which usually have a platform-specific titlebar and border, and
+  <i>windows</i>, which never have any additional platform-specific
+  decorations.
     
     
-    Whenever we refer to the size or position of a surface, we are
-    referring to the size or position of the UI-accessible portion of the
-    surface; this does not include any platform-specific decorations. This
-    means that if you set the position of a frame to (0,0), the
-    platform-specific titlebar will actually be off the screen on most
-    platforms (it will be above and to the left of the top-left corner of
-    the screen).
+  Whenever we refer to the size or position of a surface, we are
+  referring to the size or position of the UI-accessible portion of the
+  surface; this does not include any platform-specific decorations. This
+  means that if you set the position of a frame to (0,0), the
+  platform-specific titlebar will actually be off the screen on most
+  platforms (it will be above and to the left of the top-left corner of
+  the screen).
     
     
-    Surfaces are not actual JavaScript objects; you cannot obtain a
-    reference to a surface.  However, each surface is uniquely identified
-    by its <i>root box</i>, described in the next section.
+  Surfaces are not actual JavaScript objects; you cannot obtain a
+  reference to a surface.  However, each surface is uniquely identified
+  by its <i>root box</i>, described in the next section.
     
     
-    </section>
+</section>
 
 
-  <section title="Boxes">
+<section title="Boxes">
 
 
-    A <i>box</i> is the fundamental unit from which all Ibex user
-    interfaces are built.  Boxes can contain other boxes (known as
-    <i>children</i>).  Each Surface has a single box associated with it
-    called the <i>root box</i>; the root box and its children (and its
-    children's children, and so on) form the surface's <i>box tree</i>.
+  A <i>box</i> is the fundamental unit from which all Ibex user
+  interfaces are built.  Boxes can contain other boxes (known as
+  <i>children</i>).  Each Surface has a single box associated with it
+  called the <i>root box</i>; the root box and its children (and its
+  children's children, and so on) form the surface's <i>box tree</i>.
     
     
-    There are three ways to think of a box: as a rendered visualization on
-    the screen (the "Visual Representation"), as a JavaScript object (the
-    "Object Representation"), and as an XML tag (the "XML
-    Representation").
+  There are three ways to think of a box: as a rendered visualization on
+  the screen (the "Visual Representation"), as a JavaScript object (the
+  "Object Representation"), and as an XML tag (the "XML
+  Representation").
     
     
-    FIXME: diagram here
+  FIXME: diagram here
     
     
-    All three representations are equally valid, and being able to figure
-    out what an action in one representation would mean in terms of the other
-    two representations is crucial to a solid understanding of Ibex.
+  All three representations are equally valid, and being able to figure
+  out what an action in one representation would mean in terms of the other
+  two representations is crucial to a solid understanding of Ibex.
     
     
-    </section>
-
   <section title="The Object Representation">
 
     Each box is a full-fledged ECMAscript object, and can store key-value
   <section title="The Object Representation">
 
     Each box is a full-fledged ECMAscript object, and can store key-value
     will be explained later.  Each box's numeric properties hold its
     <i>child boxes</i>. 
     
     will be explained later.  Each box's numeric properties hold its
     <i>child boxes</i>. 
     
-    </section>
+  </section>
 
   <section title="The Visual Representation">
 
     Each box occupies a rectangular region on the surface.  The visual
     appearance of a surface is created by rendering each box in its tree.
 
   <section title="The Visual Representation">
 
     Each box occupies a rectangular region on the surface.  The visual
     appearance of a surface is created by rendering each box in its tree.
-    Unless the <tt>clip</tt> attribute is <tt>false</tt>, each box will
+    Unless the <t>clip</t> attribute is <t>false</t>, each box will
     clip its childrens' visual representations to its own, so that the
     children appear "confined to" the parent.  Children are rendered after
     their parents so they appear "on top of" their parents (they obscure
     clip its childrens' visual representations to its own, so that the
     children appear "confined to" the parent.  Children are rendered after
     their parents so they appear "on top of" their parents (they obscure
         <list>
             The path has an associated <b>strokecolor</b>, which is a
             color
         <list>
             The path has an associated <b>strokecolor</b>, which is a
             color
-            
+
             The path has an associated <b>strokewidth</b>, which is a
             number specifying the width of the stroke.
             
             The path has an associated <b>strokewidth</b>, which is a
             number specifying the width of the stroke.
             
     appearance.  Every single box you see in Ibex is drawn only on the
     basis of these components and its size.
     
     appearance.  Every single box you see in Ibex is drawn only on the
     basis of these components and its size.
     
-    </section>
+  </section>
 
   <section title="The XML Representation">
 
 
   <section title="The XML Representation">
 
     <i>instantiation</i>, you always apply a template to a pre-existing
     box, and you can apply multiple templates to the same box.  Each XML
     tag corresponds to a single box, or to another template which will be
     <i>instantiation</i>, you always apply a template to a pre-existing
     box, and you can apply multiple templates to the same box.  Each XML
     tag corresponds to a single box, or to another template which will be
-    applied to that box.  For example, a <tt>scrollbar</tt> template, when
+    applied to that box.  For example, a <t>scrollbar</t> template, when
     applied, will construct a tree of boxes which has the visual
     appearance and behavior of a scrollbar.
     
     applied, will construct a tree of boxes which has the visual
     appearance and behavior of a scrollbar.
     
     instantiated, the XML is effectively "thrown away", and JavaScript code is
     free to alter the boxes.
     
     instantiated, the XML is effectively "thrown away", and JavaScript code is
     free to alter the boxes.
     
-    </section>
-
-  <section title="Templates">
-
-    Each template is an XML document whose root element
-    is <tt>&lt;ibex></tt>.  Any text content of the root element is
-    ignored, and may safely be used for comments.  The root element may
-    have any of the following elements as children, each of which may
-    appear no more than once, and which must appear in this order:
-    
-    Here is a sample Ibex file:
-    
-    <pre>
-    <ibex xmlns="ibex.widget" xmlns:lib="ibex.lib">
-        This is a sample Ibex file. Text up here is ignored.
-        Copyright (C) 2004 Mustapha Mond.
-        <static>
-            // code here will be executed only once
-        </static>
-        <template cols="5">
-            <box id="container"/>
-            <checkbox/>
-            <box>
-                /* This has to be commented out or else it
-                   will be treated as a script */
-                <lib:scrollbar/>
-            </box>
-        </template>
-    </ibex>
-    </pre>
+  </section>
+</section>
+
+<section title="Templates">
+
+  Each template is an XML document whose root element
+  is <t>&lt;ibex></t>.  Any text content of the root element is
+  ignored, and may safely be used for comments.  The root element may
+  have any of the following elements as children, each of which may
+  appear no more than once, and which must appear in this order:
+    
+  Here is a sample Ibex file:
+    
+  <pre>
+  <ibex xmlns="ibex.widget" xmlns:lib="ibex.lib">
+      This is a sample Ibex file. Text up here is ignored.
+      Copyright (C) 2004 Mustapha Mond.
+      <static>
+          // code here will be executed only once
+      </static>
+      <template cols="5">
+          <box id="container"/>
+          <checkbox/>
+          <box>
+              /* This has to be commented out or else it
+                 will be treated as a script */
+              <lib:scrollbar/>
+          </box>
+      </template>
+  </ibex>
+  </pre>
     
     
-    </section>
-
-  <section title="Applying an XML tag to a box">
+  <heading title="Applying an XML Tag to a Box"/>
 
     The following description of the box application is extremely detailed
     and precise; it is intended for UI designers who need to know the
 
     The following description of the box application is extremely detailed
     and precise; it is intended for UI designers who need to know the
     However, most of the time you can just pretend that the XML tags and
     the boxes are the same thing.
     
     However, most of the time you can just pretend that the XML tags and
     the boxes are the same thing.
     
-    To apply an XML tag <b>X</b> to a box <b>B</b>, perform the following
+    To apply an XML tag <t><b>X</b></t> to a box <t><b>B</b></t>, perform the following
     operations, in this order:
     
     <list type="ordered">
 
     operations, in this order:
     
     <list type="ordered">
 
-        Allocate a fresh scope <b>s</b> whose parent scope is
-        <b>B</b>.
+        Allocate a fresh scope <t><b>s</b></t> whose parent scope is
+        <t><b>b</b></t>.
         
         
-        Process each child element or text segment of <b>X</b> in the
+        Process each child element or text segment of <t><b>X</b></t> in the
         order they appear in the document: For each <i>text
         order they appear in the document: For each <i>text
-        segment</i> <b>t</b>:
+        segment</i> <t><b>t</b></t>:
 
         <list>
 
         <list>
-            Treat <b>t</b> a JavaScript script, and execute it
-            with <b>s</b> as the root scope.
+            Treat <t><b>t</b></t> a JavaScript script, and execute it
+            with <t><b>s</b></t> as the root scope.
         </list>
 
         </list>
 
-        For each <i>child element</i> <b>x</b> of <b>X</b>:  
+        For each child element <t><b>x</b></t> of
+        <t><b>x</b></t>:
 
         <list>
 
         <list>
-            Create a new box <b>b</b>.
+            Create a new box <t><b>b</b></t>.
             
             
-            If the name of tag <b>x</b> is not "<tt>box</tt>" (in the
+            If the name of tag <t><b>x</b></t> is not "<t>box</t>" (in the
             default XML namespace), prepend the tag's namespace
             identifier uri (if any) to the name of the tag, and use
             the result as a key to retrieve a property from the root
             stream (defined later).  Interpret the resulting stream as
             default XML namespace), prepend the tag's namespace
             identifier uri (if any) to the name of the tag, and use
             the result as a key to retrieve a property from the root
             stream (defined later).  Interpret the resulting stream as
-            a template and apply that template to <b>b</b>.
+            a template and apply that template to <t><b>b</b></t>.
             
             
-            (recursively) apply <b>x</b> to <b>b</b>.
+            (recursively) apply <t><b>x</b></t> to <t><b>b</b></t>.
             
             
-            If <b>x</b> has an <tt>id</tt> attribute, declare a variable
-            in <b>s</b> whose name is the value of the <tt>id</tt>
-            attribute, prefixed with the <tt>$</tt> character, and whose
-            value is <b>b</b>
+            If <t><b>x</b></t> has an <t>id</t> attribute, declare a variable
+            in <t><b>s</b></t> whose name is the value of the <t>id</t>
+            attribute, prefixed with the <t>$</t> character, and whose
+            value is <t><b>b</b></t>
             
             
-            Copy any <tt>$</tt>-variables created during the application
-            of <b>x</b> into scope <b>s</b>.
+            Copy any <t>$</t>-variables created during the application
+            of <t><b>x</b></t> into scope <t><b>s</b></t>.
             
             
-            Append <b>b</b> as the last child of <b>B</b>.
+            Append <t><b>b</b></t> as the last child of <t><b>b</b></t>.
         </list>
         
         </list>
         
-        Apply any attributes on <b>X</b> to <b>B</b>, except for
-        <tt>id</tt>.  Since XML specifies that the order of attributes
+        Apply any attributes on <t><b>x</b></t> to <t><b>b</b></t>, except for
+        <t>id</t>.  Since XML specifies that the order of attributes
         cannot be significant, Ibex processes attributes in
         alphabetical order by attribute name.  For example, if
         cannot be significant, Ibex processes attributes in
         alphabetical order by attribute name.  For example, if
-        <b>X</b> has the attribute <tt>foo="bar</tt>", then the
-        equivalent of the statement <tt>B.foo="bar";</tt> will be
+        <t><b>x</b></t> has the attribute <t>foo="bar</t>", then the
+        equivalent of the statement <t>B.foo="bar";</t> will be
         performed, with the following exceptions:
 
         <list>
             If the value portion of the attribute is the string
         performed, with the following exceptions:
 
         <list>
             If the value portion of the attribute is the string
-            "<tt>true</tt>", put the boolean <tt>true</tt>. If the
-            value is "<tt>false</tt>", put the boolean <tt>false</tt>.
+            "<t>true</t>", put the boolean <t>true</t>. If the
+            value is "<t>false</t>", put the boolean <t>false</t>.
         
             If the value is a valid ECMAscript number, put it as a
             number (instead of a string).
                  
         
             If the value is a valid ECMAscript number, put it as a
             number (instead of a string).
                  
-            If the value begins with a dollar sign (<tt>$</tt>),
+            If the value begins with a dollar sign (<t>$</t>),
             retrieve the value of the corresponding variable in
             retrieve the value of the corresponding variable in
-            <b>s</b> and use that value instead.
+            <t><b>s</b></t> and use that value instead.
          
          
-            If the value begins with a dot (<tt>.</tt>), prepend the
+            If the value begins with a dot (<t>.</t>), prepend the
             attributes' namespace identifier uri (if any) and
             interpret the remainder as a property to be retrieved from
             the root stream (defined later).
             attributes' namespace identifier uri (if any) and
             interpret the remainder as a property to be retrieved from
             the root stream (defined later).
 
     </list>
     
 
     </list>
     
-    </section>
+</section>
 
 
-  <section title="Life Cycle of an Ibex Application">
+<section title="Life Cycle of an Ibex Application">
 
 
-    A user begins by specifying the URL of an Ibex application run.
-    Usually this is done by visiting a web page which uses the
-    <i>shoehorn</i> to install the core if it is not already on the user's
-    machine, but you can also supply the URL on the command line.
+  A user begins by specifying the URL of an Ibex application run.
+  Usually this is done by visiting a web page which uses the
+  <i>wildebeest</i> to install the core if it is not already on the user's
+  machine, but you can also supply the URL on the command line.
     
     
-    The Ibex Core downloads the .ibex for the application, loads it, applies
-    the <tt>main.ibex</tt> template and renders it onto the screen, running
-    any associated ECMAscript code.
+  The Ibex Core downloads the .ibex for the application, loads it, applies
+  the <t>main.ibex</t> template and renders it onto the screen, running
+  any associated ECMAscript code.
     
     
-    The user interacts with the application by clicking and moving the
-    mouse, and by pressing keys on the keyboard.  These actions trigger
-    fragments of JavaScript code which are designated to handle events.
-    This JavaScript code can then relay important information back to the
-    server using XML-RPC or SOAP, or it can modify the structure and
-    properties of the user interface to change its appearance, thereby
-    giving feedback to the user.
+  The user interacts with the application by clicking and moving the
+  mouse, and by pressing keys on the keyboard.  These actions trigger
+  fragments of JavaScript code which are designated to handle events.
+  This JavaScript code can then relay important information back to the
+  server using XML-RPC or SOAP, or it can modify the structure and
+  properties of the user interface to change its appearance, thereby
+  giving feedback to the user.
     
     
     
     
-    DIAGRAM: graphic here showing the circular feedback cycle.
+  DIAGRAM: graphic here showing the circular feedback cycle.
     
     
     
     
-    The Ibex core quits when the last remaining surface has been destroyed.
+  The Ibex core quits when the last remaining surface has been destroyed.
     
     
-    </section>
+</section>
 
 
-  </section>
 <!-- ----------------------------------------------------------------------- -->
 <section title="Layout and Rendering">
 
 <!-- ----------------------------------------------------------------------- -->
 <section title="Layout and Rendering">
 
     For brevity, the rest of this chapter deals only with width and
     columns.  Height and rows is treated identically and independently.
     Also, it is important to note that the term <i>minimum width</i> is
     For brevity, the rest of this chapter deals only with width and
     columns.  Height and rows is treated identically and independently.
     Also, it is important to note that the term <i>minimum width</i> is
-    not the same thing as the property <tt>minwidth</tt>, although they
+    not the same thing as the property <t>minwidth</t>, although they
     are closely related.
     
   <section title="The size of the root box">
 
     When the user resizes a window, Ibex changes the root box's
     are closely related.
     
   <section title="The size of the root box">
 
     When the user resizes a window, Ibex changes the root box's
-    <tt>maxwidth</tt> and <tt>maxheight</tt> to match the size chosen by
+    <t>maxwidth</t> and <t>maxheight</t> to match the size chosen by
     the user and then determines the root box's size using the same sizing
     rules it uses for other boxes.
     
     Ibex will always attempt to prevent the
     user from making the surface smaller than the root box's
     the user and then determines the root box's size using the same sizing
     rules it uses for other boxes.
     
     Ibex will always attempt to prevent the
     user from making the surface smaller than the root box's
-    <tt>minwidth</tt> and <tt>minheight</tt>.  If the <tt>hshrink</tt> or
-    <tt>vshrink</tt> flag is set, Ibex will try to prevent the user from
+    <t>minwidth</t> and <t>minheight</t>.  If the <t>hshrink</t> or
+    <t>vshrink</t> flag is set, Ibex will try to prevent the user from
     resizing the surface at all.  However, not all platforms give Ibex
     enough control to do this.
     
     resizing the surface at all.  However, not all platforms give Ibex
     enough control to do this.
     
     
     <list type="unordered">
 
     
     <list type="unordered">
 
-        If the <tt>align</tt> property is "<tt>center</tt>", then the
+        If the <t>align</t> property is "<t>center</t>", then the
         alignment point is the center of the box.
         
         alignment point is the center of the box.
         
-        If the <tt>align</tt> property is "<tt>topleft</tt>",
-        "<tt>bottomleft</tt>", "<tt>topright</tt>", or
-        "<tt>bottomright</tt>", then the alignment point is
+        If the <t>align</t> property is "<t>topleft</t>",
+        "<t>bottomleft</t>", "<t>topright</t>", or
+        "<t>bottomright</t>", then the alignment point is
         corresponding corner of the box.
         
         corresponding corner of the box.
         
-        If the <tt>align</tt> property is "<tt>top</tt>",
-        "<tt>bottom</tt>", "<tt>right</tt>", or "<tt>left</tt>", then
+        If the <t>align</t> property is "<t>top</t>",
+        "<t>bottom</t>", "<t>right</t>", or "<t>left</t>", then
         the alignment point is middle of the corresponding edge of the
         box.
 
         the alignment point is middle of the corresponding edge of the
         box.
 
     FIXME: diagram
     
     When positioning a child box, the alignment point is determined by the
     FIXME: diagram
     
     When positioning a child box, the alignment point is determined by the
-    <i>parent's</i> <tt>align</tt> property.  When positioning a visual
+    <i>parent's</i> <t>align</t> property.  When positioning a visual
     element (a texture, path, or text string) within a box, the alignment
     element (a texture, path, or text string) within a box, the alignment
-    point is determined by the <i>box's own</i> <tt>align</tt> property.
+    point is determined by the <i>box's own</i> <t>align</t> property.
     
     A simple way to think about this is that whenever there are two boxes
     involved in the decision, you should use the parent's alignment point.
     
     A simple way to think about this is that whenever there are two boxes
     involved in the decision, you should use the parent's alignment point.
   <section title="Packing">
 
     of <i>cells</i> is created within the parent.  If the parent's
   <section title="Packing">
 
     of <i>cells</i> is created within the parent.  If the parent's
-    <tt>cols</tt> property is set to 0, the cell grid has an infinite
-    number of columns.  Either <tt>cols</tt> or <tt>rows</tt> must be
+    <t>cols</t> property is set to 0, the cell grid has an infinite
+    number of columns.  Either <t>cols</t> or <t>rows</t> must be
     zero, but not both.
         
     zero, but not both.
         
-    If a child's <tt>visible</tt> property is <tt>false</tt>, it does
+    If a child's <t>visible</t> property is <t>false</t>, it does
     not occupy any cells (and is not rendered).  Otherwise, each child
     not occupy any cells (and is not rendered).  Otherwise, each child
-    occupies a rectangular set of cells <tt>child.colspan</tt> cells
-    wide and <tt>child.rowspan</tt> cells high.
+    occupies a rectangular set of cells <t>child.colspan</t> cells
+    wide and <t>child.rowspan</t> cells high.
         
     The Core iterates over the cells in the grid in the following
         
     The Core iterates over the cells in the grid in the following
-    order: if <tt>rows</tt> is 0, the Core iterates across each column
+    order: if <t>rows</t> is 0, the Core iterates across each column
     before proceeding to the next row; otherwise rows come before
     columns.  At each cell, the Core attempts to place the <i>first
     remaining unplaced child's</i> top-left corner in that cell (with
     the child occupying some set of cells extending down and to the
     right of that cell).  If the parent has a fixed number of columns
     before proceeding to the next row; otherwise rows come before
     columns.  At each cell, the Core attempts to place the <i>first
     remaining unplaced child's</i> top-left corner in that cell (with
     the child occupying some set of cells extending down and to the
     right of that cell).  If the parent has a fixed number of columns
-    and the child's <tt>colspan</tt> exceeds that limit, the child is
+    and the child's <t>colspan</t> exceeds that limit, the child is
     placed in column zero regardless, but only occupies the available
     set of cells (it does not "hang off the end" of the box).
     
     placed in column zero regardless, but only occupies the available
     set of cells (it does not "hang off the end" of the box).
     
-    <img src="image/layout.png"/>
+    <image url="image/layout.png"/>
     
     <pre>
     
     <pre>
-        <box cols="3">
-            <box id="1" />
-            <box id="2" rowspan="2" />
-            <box id="3" colspan="2" />
-            <box id="4" />
-            <box id="5" colspan="2" />
-        </box>
+    <box cols="3">
+        <box id="1" />
+        <box id="2" rowspan="2" />
+        <box id="3" colspan="2" />
+        <box id="4" />
+        <box id="5" colspan="2" />
+    </box>
     </pre>
     
     Notes on the layout example:
     </pre>
     
     Notes on the layout example:
         maximum of:
 
         <list>
         maximum of:
 
         <list>
-            Its <tt>minwidth</tt>
+            Its <t>minwidth</t>
              
              
-            The width of the box's <tt>text</tt> (after applying the
-            box's <tt>transform</tt>).
+            The width of the box's <t>text</t> (after applying the
+            box's <t>transform</t>).
              
             The width of the box's path (after applying the box's
              
             The width of the box's path (after applying the box's
-            <tt>transform</tt>) <i>if the box is <tt>packed</tt></i>.
+            <t>transform</t>) <i>if the box is <t>packed</t></i>.
              
             The width of the bounding box enclosing the box's cells.
         </list>
         
         The minimum width of each cell is computed as the minimum
         width of the box occupying it divided by the box's
              
             The width of the bounding box enclosing the box's cells.
         </list>
         
         The minimum width of each cell is computed as the minimum
         width of the box occupying it divided by the box's
-        <tt>colspan</tt>.
+        <t>colspan</t>.
         
         
-        If a box's <tt>hshrink</tt> property is set to
-        <tt>true</tt>, the box's maximum width is the same as its
+        If a box's <t>hshrink</t> property is set to
+        <t>true</t>, the box's maximum width is the same as its
         minimum width; otherwise it is the box's
         minimum width; otherwise it is the box's
-        <tt>maxwidth</tt>.
+        <t>maxwidth</t>.
         
         
-        The maximum width of each cell is the <tt>maxwidth</tt> of
+        The maximum width of each cell is the <t>maxwidth</t> of
         the box occupying it divided by the box's
         the box occupying it divided by the box's
-        <tt>colspan</tt>.
+        <t>colspan</t>.
 
     </list>
 
 
     </list>
 
         <i>minimum width</i> of all the cells in that column.
         <b>NOTE:</b> although a column or row can be sized smaller
         than its "minimum width" or larger than its "maximum width", a
         <i>minimum width</i> of all the cells in that column.
         <b>NOTE:</b> although a column or row can be sized smaller
         than its "minimum width" or larger than its "maximum width", a
-        box will <i>never</i> be smaller than its <tt>minwidth</tt> or
-        larger than its <tt>maxwidth</tt>.
+        box will <i>never</i> be smaller than its <t>minwidth</t> or
+        larger than its <t>maxwidth</t>.
         
         Each column's maximum width is the largest maximum width of
         the cells in that column, but no smaller than the column's
         
         Each column's maximum width is the largest maximum width of
         the cells in that column, but no smaller than the column's
         
         Next, the rows and columns are positioned within the parent
         box.  The rows and columns are transformed according to the
         
         Next, the rows and columns are positioned within the parent
         box.  The rows and columns are transformed according to the
-        parent's <tt>transform</tt> property, and the bounding box of
+        parent's <t>transform</t> property, and the bounding box of
         the resulting cells are placed such that the cells' alignment
         point coincides with the parent's alignment point (both
         the resulting cells are placed such that the cells' alignment
         point coincides with the parent's alignment point (both
-        alignment points are determined by the parent's <tt>align</tt>
+        alignment points are determined by the parent's <t>align</t>
         property).  FIXME: diagram
     
         <b>Packed boxes:</b> Each packed box's actual position
         property).  FIXME: diagram
     
         <b>Packed boxes:</b> Each packed box's actual position
         the cells it spans.  If this size exceeds the box's maximum
         width, the box is sized to its maximum width and centered
         horizontally within the space occupied by its cells.
         the cells it spans.  If this size exceeds the box's maximum
         width, the box is sized to its maximum width and centered
         horizontally within the space occupied by its cells.
+
         <b>Non-packed boxes</b>: each non-packed box is transformed
         <b>Non-packed boxes</b>: each non-packed box is transformed
-        according to the parent's <tt>transform</tt> property and then
-        positioned so that its alignment point is <tt>(child.x,
-        child.y)</tt> pixels from the parent's alignment point (both
-        alignment points are determined by the parent's <tt>align</tt>
+        according to the parent's <t>transform</t> property and then
+        positioned so that its alignment point is <t>(child.x,
+        child.y)</t> pixels from the parent's alignment point (both
+        alignment points are determined by the parent's <t>align</t>
         property).
         
     </list>
         property).
         
     </list>
     
     <list type="ordered">
         
     
     <list type="ordered">
         
-        If the box's <tt>transform</tt> property is non-null, the
+        If the box's <t>transform</t> property is non-null, the
         coordinate space is transformed accordingly for the rest of
         this phase and for the rendering of all children.
         
         coordinate space is transformed accordingly for the rest of
         this phase and for the rendering of all children.
         
-        If the box is packed and has a non-<tt>null</tt> path, the
+        If the box is packed and has a non-<t>null</t> path, the
         path is translated such that the alignment point of the path's
         bounding box coincides with the box's alignment point (both
         path is translated such that the alignment point of the path's
         bounding box coincides with the box's alignment point (both
-        alignment points are determined by the box's <tt>align</tt>
+        alignment points are determined by the box's <t>align</t>
         property).
         
         If a box has a path, that path is filled with the color,
         property).
         
         If a box has a path, that path is filled with the color,
-        gradient, or image specified by the <tt>fill</tt> property and
+        gradient, or image specified by the <t>fill</t> property and
         stroked with the color and width specified by the
         stroked with the color and width specified by the
-        <tt>strokecolor</tt> and <tt>strokewidth</tt> properties.
+        <t>strokecolor</t> and <t>strokewidth</t> properties.
         
         
-        If the box has a non-<tt>null</tt> <tt>text</tt> attribute,
-        the text is rendered in <tt>font</tt> with size
-        <tt>fontsize</tt> and color <tt>textcolor</tt>.  The text is
+        If the box has a non-null <t>text</t> attribute,
+        the text is rendered in <t>font</t> with size
+        <t>fontsize</t> and color <t>textcolor</t>.  The text is
         then translated such that the alignment point of the text's
         bounding box coincides with the box's alignment point (both
         then translated such that the alignment point of the text's
         bounding box coincides with the box's alignment point (both
-        alignment points are determined by the box's <tt>align</tt>
+        alignment points are determined by the box's <t>align</t>
         property).
         
         The box's children are rendered (pre-prder traversal).
         property).
         
         The box's children are rendered (pre-prder traversal).
     put will be ignored.
     
     <property name="strokecolor" type="string" default="clear">
     put will be ignored.
     
     <property name="strokecolor" type="string" default="clear">
-             If the value is a 5-character hex string (<tt>#RGB</tt>),
-             7-character hex string (<tt>#RRGGBB</tt>), 9-character hex
-             string (<tt>#AARRGGBB</tt>), the box's stroke color will be set
+             If the value is a 5-character hex string (<t>#RGB</t>),
+             7-character hex string (<t>#RRGGBB</t>), 9-character hex
+             string (<t>#AARRGGBB</t>), the box's stroke color will be set
              to that color. 
              If the value is one of the <link url="http://www.color.org/ICC-1A_1999-04.PDF" text="ICC"/> colors
              (the same set of color names supported by SVG), the stroke
              color be set to that color.
              to that color. 
              If the value is one of the <link url="http://www.color.org/ICC-1A_1999-04.PDF" text="ICC"/> colors
              (the same set of color names supported by SVG), the stroke
              color be set to that color.
-             If the value is <tt>null</tt>, the stroke color will be set to
-             clear (<tt>#00000000</tt>).
+             If the value is <t>null</t>, the stroke color will be set to
+             clear (<t>#00000000</t>).
              </property>
     
     <property name="strokewidth" type="int" default="1">
              The width (in pixels) to stroke the path with.
              </property>
     
              </property>
     
     <property name="strokewidth" type="int" default="1">
              The width (in pixels) to stroke the path with.
              </property>
     
-    <property term="fill">
+    <property name="fill">
              This property can be set to any of the values specified for
              This property can be set to any of the values specified for
-             <tt>strokecolor</tt>.  
+             <t>strokecolor</t>.  
              Alternatively, if the value written is an object, its stream
              will be read and interpreted as a PNG, GIF, or JPEG image,
              which will become the texture for this box, and the box's
              Alternatively, if the value written is an object, its stream
              will be read and interpreted as a PNG, GIF, or JPEG image,
              which will become the texture for this box, and the box's
-             <tt>minwidth</tt> and <tt>minheight</tt> properties will be
+             <t>minwidth</t> and <t>minheight</t> properties will be
              automatically set to the dimensions of the image.
              </property>
     
              automatically set to the dimensions of the image.
              </property>
     
-    <property name="path" type="string" default="&quot;&quot;">
-            The box's path.  The grammar and feature set
-            supported are identical to that specified in <link url="http://www.w3.org/TR/SVG11/paths.html" text="SVG 1.1, section
-            8"/>.
+    <property name="path" type="string" default='""'>
+            The box's path.  The grammar and feature set supported are
+            identical to that specified in <link
+            url="http://www.w3.org/TR/SVG11/paths.html" text="SVG 1.1,
+            section 8"/>.
             </property>
     
             </property>
     
-    <property name="text" type="string" default="&quot;&quot;">
-            The box's text; writing <tt>null</tt> to this property sets it
-            to "<tt></tt>".
+    <property name="text" type="string" default='""'>
+            The box's text; writing <t>null</t> to this property sets it
+            to "<t></t>".
             </property>
     
     <property name="font" type="stream" default=".ibex.font.sansserif">
             When an object is written to this property, its stream is read
             using the <link url="http://www.freetype.org" text="freetype2
             library"/>, and the resulting font is used to render the
             </property>
     
     <property name="font" type="stream" default=".ibex.font.sansserif">
             When an object is written to this property, its stream is read
             using the <link url="http://www.freetype.org" text="freetype2
             library"/>, and the resulting font is used to render the
-            box's <tt>text</tt>.
+            box's <t>text</t>.
             </property>
             
     <property name="fontsize" type="number" default="10">
             </property>
             
     <property name="fontsize" type="number" default="10">
             </property>
             
     <property name="textcolor" type="number" default="black">
             </property>
             
     <property name="textcolor" type="number" default="black">
-            The color in which to render the font; accepts the same values as <tt>strokecolor</tt>.
+            The color in which to render the font; accepts the same values as <t>strokecolor</t>.
             </property>
     
     </section>
             </property>
     
     </section>
   <section title="Layout Properties">
     
     <property name="shrink" type="boolean" default="false">
   <section title="Layout Properties">
     
     <property name="shrink" type="boolean" default="false">
-        If set to <tt>true</tt>, this box will shrink
+        If set to <t>true</t>, this box will shrink
         (horizontally/vertically/both) to the smallest size allowed by
         its children and the bounding box of its path.
         </property>
         (horizontally/vertically/both) to the smallest size allowed by
         its children and the bounding box of its path.
         </property>
     <property name="globalx" type="integer" default="varies">
         The distance between this box's (left/top) edge and the root
         box's (left/top) edge. A put to this property has the same
     <property name="globalx" type="integer" default="varies">
         The distance between this box's (left/top) edge and the root
         box's (left/top) edge. A put to this property has the same
-        effect as a put to the (<tt>x</tt>/<tt>y</tt>) property,
+        effect as a put to the (<t>x</t>/<t>y</t>) property,
         except that it is relative to the root box rather than to this
         box's parent. FIXME is this fakeable?  How is
         distance measured?
         except that it is relative to the root box rather than to this
         box's parent. FIXME is this fakeable?  How is
         distance measured?
     <property name="cols" type="integer" default="0">
         The number of (columns/rows) in which to lay out the children of this
         box.  If set to zero, the number of (columns/rows) is unconstrained.
     <property name="cols" type="integer" default="0">
         The number of (columns/rows) in which to lay out the children of this
         box.  If set to zero, the number of (columns/rows) is unconstrained.
-        Either <tt>rows</tt> or <tt>cols</tt> must be zero.  If
-        <tt>0</tt> is written to <tt>cols</tt> when <tt>rows</tt> is
-        <tt>0</tt>, the write is ignored.  If a nonzero value is
-        written to <tt>cols</tt> when <tt>rows</tt> is nonzero,
-        <tt>rows</tt> is set to <tt>0</tt>, and vice versa.
+        Either <t>rows</t> or <t>cols</t> must be zero.  If
+        <t>0</t> is written to <t>cols</t> when <t>rows</t> is
+        <t>0</t>, the write is ignored.  If a nonzero value is
+        written to <t>cols</t> when <t>rows</t> is nonzero,
+        <t>rows</t> is set to <t>0</t>, and vice versa.
         </property>
     
     <property name="colspan" type="integer" default="1">
         </property>
     
     <property name="colspan" type="integer" default="1">
         height were zero. If this is a root box, the associated surface
         will be hidden.
         When reading from this property, the value
         height were zero. If this is a root box, the associated surface
         will be hidden.
         When reading from this property, the value
-        <tt>false</tt> will be returned if this box <i>or any of its
+        <t>false</t> will be returned if this box <i>or any of its
         ancestors</i> is not visible.  Thus it is possible to write
         ancestors</i> is not visible.  Thus it is possible to write
-        <tt>true</tt> to a box's <tt>visible</tt> property and then
-        read back <tt>false</tt>.
+        <t>true</t> to a box's <t>visible</t> property and then
+        read back <t>false</t>.
         </property>
     
     <property name="packed" type="boolean" default="true">
         </property>
     
     <property name="packed" type="boolean" default="true">
   <section title="Child Control Properties">
     
     During a box initialization, script-private references to a box's
   <section title="Child Control Properties">
     
     During a box initialization, script-private references to a box's
-    descendants with <tt>id</tt> attributes are placed on the box. These
+    descendants with <t>id</t> attributes are placed on the box. These
     references allow scripts on that box to easily refer to descendant
     nodes created by the template in which the script appears. For
     example, these two blocks of code have exactly the same effect:
     references allow scripts on that box to easily refer to descendant
     nodes created by the template in which the script appears. For
     example, these two blocks of code have exactly the same effect:
     out.  If a box has a non-null redirect target, reads and writes to these
     properties will be forwarded to the redirect target.
     
     out.  If a box has a non-null redirect target, reads and writes to these
     properties will be forwarded to the redirect target.
     
-    The <tt>redirect</tt> attribute is very useful for hiding the
+    The <t>redirect</t> attribute is very useful for hiding the
     internal structure of a widget, and for allowing widgets to act as
     "smart" containers for other widgets. For example, a menu widget might
     have an invisible child as its redirect target; this way, when boxes
     internal structure of a widget, and for allowing widgets to act as
     "smart" containers for other widgets. For example, a menu widget might
     have an invisible child as its redirect target; this way, when boxes
     widget, they do not appear until the menu is pulled down.
     
     <property name="numeric properties" type="int" default="">
     widget, they do not appear until the menu is pulled down.
     
     <property name="numeric properties" type="int" default="">
-        The <i>n</i>th child of box <tt>b</tt> can be accessed by reading from
-        <tt>b[n]</tt>. The <i>n</i>th child can be removed by writing
-        <tt>null</tt> to <tt>b[n]</tt> (the child will become parentless). A
+        The <i>n</i>th child of box <t>b</t> can be accessed by reading from
+        <t>b[n]</t>. The <i>n</i>th child can be removed by writing
+        <t>null</t> to <t>b[n]</t> (the child will become parentless). A
         new child can be inserted <i>before</i> the <i>n</i>th child by
         new child can be inserted <i>before</i> the <i>n</i>th child by
-        writing it to <tt>b[n]</tt>; if the value written is already a child of
-        <tt>b</tt>, it will be removed from <tt>b</tt> first. It is important
+        writing it to <t>b[n]</t>; if the value written is already a child of
+        <t>b</t>, it will be removed from <t>b</t> first. It is important
         to note that this behavior is different from ECMAscript arrays --
         to note that this behavior is different from ECMAscript arrays --
-        writing a non-<tt>null</tt> value to <tt>b[n]</tt> does not eliminate
+        writing a non-<t>null</t> value to <t>b[n]</t> does not eliminate
         the <i>n</i>th child; it merely shifts it over one position.  
         <b>Note:</b> Unlike most JavaScript objects, enumerating a Box's
         the <i>n</i>th child; it merely shifts it over one position.  
         <b>Note:</b> Unlike most JavaScript objects, enumerating a Box's
-        properties with the JavaScript <tt>for..in</tt> construct will
+        properties with the JavaScript <t>for..in</t> construct will
         enumerate <i>only</i> the box's children and not any other properties.
         </property>
     
     <property name="clip" type="boolean" default="true">
         enumerate <i>only</i> the box's children and not any other properties.
         </property>
     
     <property name="clip" type="boolean" default="true">
-        If <tt>true</tt>, the visual representation of this box's
+        If <t>true</t>, the visual representation of this box's
         children will be clipped to the boundaries of this box.
         children will be clipped to the boundaries of this box.
-        <b>Note:</b> setting this property to <tt>false</tt> imposes a
+        <b>Note:</b> setting this property to <t>false</t> imposes a
         substantial performance penalty.
         </property>
     
         substantial performance penalty.
         </property>
     
     
     <property name="surface" type="" default="null">
         If this box has a parent, this property returns
     
     <property name="surface" type="" default="null">
         If this box has a parent, this property returns
-        <tt><i>parent</i>.surface</tt>; otherwise it returns null.
+        <t><i>parent</i>.surface</t>; otherwise it returns null.
         This property is a simple building block that the widget
         library uses to implement more complex functionality such as
         focus control and popups.
         This property is a simple building block that the widget
         library uses to implement more complex functionality such as
         focus control and popups.
     
     <property name="cursor" type="string" default="null">
         The shape that the cursor should take when inside this
     
     <property name="cursor" type="string" default="null">
         The shape that the cursor should take when inside this
-        box. Valid values are: "<tt>default </tt> " , "<tt>wait</tt>",
-        "<tt>crosshair</tt>", "<tt>text</tt>", "<tt>hand</tt>", and
-        "<tt>move</tt>", as well as resizing cursors"<tt>east</tt>",
-        "<tt>west</tt>", "<tt>north</tt>", "<tt>south</tt>",
-        "<tt>northwest</tt>", "<tt>northeast</tt>",
-        "<tt>southwest</tt>", and "<tt>southeast</tt>". Note that on
+        box. Valid values are: "<t>default </t> " , "<t>wait</t>",
+        "<t>crosshair</t>", "<t>text</t>", "<t>hand</t>", and
+        "<t>move</t>", as well as resizing cursors"<t>east</t>",
+        "<t>west</t>", "<t>north</t>", "<t>south</t>",
+        "<t>northwest</t>", "<t>northeast</t>",
+        "<t>southwest</t>", and "<t>southeast</t>". Note that on
         some platforms, resize cursors for opposite directions (such
         some platforms, resize cursors for opposite directions (such
-        as <tt>northwest</tt> and <tt>southeast</tt> are the
+        as <t>northwest</t> and <t>southeast</t> are the
         same).
         same).
-        If a box's cursor is <tt>null</tt>, its parent's cursor will
+        If a box's cursor is <t>null</t>, its parent's cursor will
         be used. If the root box's cursor is null, the
         be used. If the root box's cursor is null, the
-        "<tt>default</tt>" cursor will be used.
+        "<t>default</t>" cursor will be used.
         </property>
 
     <property name="mouse.x" type="integer" default="varies">
         </property>
 
     <property name="mouse.x" type="integer" default="varies">
     
     <property name="static" type="object" default="N/A">
         Reading from this property will return the parent scope used
     
     <property name="static" type="object" default="N/A">
         Reading from this property will return the parent scope used
-        to execute the <tt><static/></tt> block of the template
+        to execute the <t><static/></t> block of the template
         in which the currently-executing code resides.
         </property>
        
     <property name="thisbox" type="box" default=" ">
        Returns a reference to the box itself.
         in which the currently-executing code resides.
         </property>
        
     <property name="thisbox" type="box" default=" ">
        Returns a reference to the box itself.
-       If <tt>null</tt> is written to this property, and this box is
+       If <t>null</t> is written to this property, and this box is
        the root box of a surface, the box will be detached and the
        surface destroyed. If this box has a parent, it will be
        detached from its parent.
        the root box of a surface, the box will be detached and the
        surface destroyed. If this box has a parent, it will be
        detached from its parent.
     
     <property name="indexof()" type="function" default=" ">
         This property is actually a function; invoking
     
     <property name="indexof()" type="function" default=" ">
         This property is actually a function; invoking
-        <tt>parent.indexof(child)</tt> will return the numerical index
-        of <tt>child</tt> in <tt>parent</tt> if <tt>child</tt> is a
-        child of <tt>parent</tt> (or <tt>parent</tt>'s redirect
-        target), and <tt>-1</tt> otherwise. Writing to this property
+        <t>parent.indexof(child)</t> will return the numerical index
+        of <t>child</t> in <t>parent</t> if <t>child</t> is a
+        child of <t>parent</t> (or <t>parent</t>'s redirect
+        target), and <t>-1</t> otherwise. Writing to this property
         has no effect.
         </property>
 
     <property name="childadded" type=" " default=" ">
 
         These properties are meant to be trapped on FIXME defined later?. Placing a trap on
         has no effect.
         </property>
 
     <property name="childadded" type=" " default=" ">
 
         These properties are meant to be trapped on FIXME defined later?. Placing a trap on
-        <tt>childadded/childremoved</tt> lets a box receive
+        <t>childadded/childremoved</t> lets a box receive
         notification when a child is added/removed. In either
         situation, the child will be passed as an argument to the trap
         function <i>after</i> the addition or removal has been
         notification when a child is added/removed. In either
         situation, the child will be passed as an argument to the trap
         function <i>after</i> the addition or removal has been
         the traps.
 
         Note also that these traps are still triggered if a box's
         the traps.
 
         Note also that these traps are still triggered if a box's
-        <tt>redirect</tt> target is <i>null</i>.  This is useful for
+        <t>redirect</t> target is <i>null</i>.  This is useful for
         boxes that need to accept children and then relocate them
         elsewhere.
         </property>
         boxes that need to accept children and then relocate them
         elsewhere.
         </property>
     to that particular box.
     
     <property name="Enter">
     to that particular box.
     
     <property name="Enter">
-        The value <tt>true</tt> is written to this property when the mouse enters the box.
+        The value <t>true</t> is written to this property when the mouse enters the box.
         </property>
     
     <property name="Leave">
         </property>
     
     <property name="Leave">
-        The value <tt>true</tt> is written to this property when the mouse leaves the box.
+        The value <t>true</t> is written to this property when the mouse leaves the box.
         </property>
     
     <property name="SizeChange">
         </property>
     
     <property name="SizeChange">
-        The value <tt>true</tt> is put to this property after the size
+        The value <t>true</t> is put to this property after the size
         of this box changes.
         </property>
     
         of this box changes.
         </property>
     
     of a surface.
     
     <property name="Focused">
     of a surface.
     
     <property name="Focused">
-        The value <tt>true</tt> is put to this property on the root box
-        when the surface gains the input focus, and <tt>false</tt> when
+        The value <t>true</t> is put to this property on the root box
+        when the surface gains the input focus, and <t>false</t> when
         the surface loses the input focus. Reading from this value will
         the surface loses the input focus. Reading from this value will
-        return <tt>true</tt> if the surface is focused and <tt>false</tt>
-        if it is not. Putting <tt>true</tt> to this property will
+        return <t>true</t> if the surface is focused and <t>false</t>
+        if it is not. Putting <t>true</t> to this property will
         <i>not</i> cause the surface to "steal" the input focus from other
         windows.
         </property>
     
     <property name="Maximized">
         <i>not</i> cause the surface to "steal" the input focus from other
         windows.
         </property>
     
     <property name="Maximized">
-        The value <tt>true</tt> is put to this property on the root box
-        when the surface is maximized, and <tt>false</tt> when the surface
-        is un-maximized. Reading from this value will return <tt>true</tt>
-        if the surface is maximized and <tt>false</tt> if it is
-        not. Putting <tt>true</tt> to this property will maximize the
-        window, and putting <tt>false</tt> to this property will
+        The value <t>true</t> is put to this property on the root box
+        when the surface is maximized, and <t>false</t> when the surface
+        is un-maximized. Reading from this value will return <t>true</t>
+        if the surface is maximized and <t>false</t> if it is
+        not. Putting <t>true</t> to this property will maximize the
+        window, and putting <t>false</t> to this property will
         unmaximize the window.
         Note that not all platforms support maximization.
         </property>
     
     <property name="Minimized">
         unmaximize the window.
         Note that not all platforms support maximization.
         </property>
     
     <property name="Minimized">
-        The value <tt>true</tt> is put to this property on the root box
-        when the surface is minimized, and <tt>false</tt> when the surface
-        is unminimized. Reading from this value will return <tt>true</tt>
-        if the surface is minimized and <tt>false</tt> if it is
-        not. Putting <tt>true</tt> to this property will minimize the
-        window, and putting <tt>false</tt> will unminimize it.
+        The value <t>true</t> is put to this property on the root box
+        when the surface is minimized, and <t>false</t> when the surface
+        is unminimized. Reading from this value will return <t>true</t>
+        if the surface is minimized and <t>false</t> if it is
+        not. Putting <t>true</t> to this property will minimize the
+        window, and putting <t>false</t> will unminimize it.
         </property>
     
     <property name="Close">
         When the user attempts to close a surface, the value
         </property>
     
     <property name="Close">
         When the user attempts to close a surface, the value
-        <tt>true</tt> will be put to this property. Scripts may trap
+        <t>true</t> will be put to this property. Scripts may trap
         this property FIXME defined later? to
         prevent the window from closing. Putting the value
         this property FIXME defined later? to
         prevent the window from closing. Putting the value
-        <tt>true</tt> to this property on a root box has the same
-        effect as putting <tt>null</tt> to the <tt>thisbox</tt>
+        <t>true</t> to this property on a root box has the same
+        effect as putting <t>null</t> to the <t>thisbox</t>
         property.
         </property>
     
         property.
         </property>
     
     sequence of bytes that can be read or written to.
     
     By default an object has an empty stream (zero bytes).  However, some objects
     sequence of bytes that can be read or written to.
     
     By default an object has an empty stream (zero bytes).  However, some objects
-    (returned from special methods on the <tt>ibex</tt> object) have
+    (returned from special methods on the <t>ibex</t> object) have
     streams yielding data read from an url, file, or a component of a zip
     archive.  In a future release, the stream associated with a box will
     be an .ibex template which, when applied, will fully reconstitute the
     streams yielding data read from an url, file, or a component of a zip
     archive.  In a future release, the stream associated with a box will
     be an .ibex template which, when applied, will fully reconstitute the
     You can create a stream from a URL by calling
     
     <pre>
     You can create a stream from a URL by calling
     
     <pre>
-        var r = ibex.stream.url("http://...");
+    var r = ibex.stream.url("http://...");
     </pre>
     
     This will return an object whose stream draws data from the specified
     </pre>
     
     This will return an object whose stream draws data from the specified
   <section title="Getting Substreams">
 
     Most stream objects let you access
   <section title="Getting Substreams">
 
     Most stream objects let you access
-    substreams using the usual JavaScript operators <tt>[]</tt> and
-    <tt>.</tt>, as well as the <tt>for..in</tt> syntax.
+    substreams using the usual JavaScript operators <t>[]</t> and
+    <t>.</t>, as well as the <t>for..in</t> syntax.
     
     <pre>
     
     <pre>
-      // r1 and r2 are equivalent but not equal (!=)
-      var r1 = ibex.stream.url("http://www.ibex.org/foo/bar.html");
-      var r2 = ibex.stream.url("http://www.ibex.org/foo")["bar.html"];
+    // r1 and r2 are equivalent but not equal (!=)
+    var r1 = ibex.stream.url("http://www.ibex.org/foo/bar.html");
+    var r2 = ibex.stream.url("http://www.ibex.org/foo")["bar.html"];
     </pre>
     
     </section>
 
   <section title="The Root Stream">
 
     </pre>
     
     </section>
 
   <section title="The Root Stream">
 
-    The empty-string property on the <tt>ibex</tt> object is called the
-    <i>root stream</i>.  You can access this object as <tt>ibex..</tt> or
-    <tt>ibex[""]</tt>.  Additionally, any expression which starts with a
+    The empty-string property on the <t>ibex</t> object is called the
+    <i>root stream</i>.  You can access this object as <t>ibex..</t> or
+    <t>ibex[""]</t>.  Additionally, any expression which starts with a
     dot is treated as property to be retrieved from the root stream.  The
     following three expressions are equivalent:
     
     <pre>
     dot is treated as property to be retrieved from the root stream.  The
     following three expressions are equivalent:
     
     <pre>
-      ibex..foo
-      ibex[""].foo
-      .foo
+    ibex..foo
+    ibex[""].foo
+    .foo
     </pre>
 
     </section>
     </pre>
 
     </section>
   <section title="Static Blocks">
 
     You can access variables within the static block of a template by
   <section title="Static Blocks">
 
     You can access variables within the static block of a template by
-    appending a double period (<tt>..</tt>) and the variable name to the
+    appending a double period (<t>..</t>) and the variable name to the
     stream used to load that template:
     
     <pre>
     stream used to load that template:
     
     <pre>
-      <!-- org/ibex/themes/monopoly/scrollbar.ibex -->
-              foo = 12;
-      ...
-      // elsewhere
-      ibex.log.print(org.ibex.themes.monopoly.scrollbar..foo);   // prints "12"
+    <!-- org/ibex/themes/monopoly/scrollbar.ibex -->
+            foo = 12;
+    ...
+    // elsewhere
+    ibex.log.print(org.ibex.themes.monopoly.scrollbar..foo);   // prints "12"
     </pre>
     
     </section>
     </pre>
     
     </section>
 
     If you attempt to send a stream as part of an XML-RPC call, the
     stream will be read in its entirity, Base64-encoded, and transmitted
 
     If you attempt to send a stream as part of an XML-RPC call, the
     stream will be read in its entirity, Base64-encoded, and transmitted
-    as a <tt><base64/></tt> element.
+    as a <t><base64/></t> element.
     
     
-    Ibex supports two special URL protocols.  The first is <tt>data:</tt>,
+    Ibex supports two special URL protocols.  The first is <t>data:</t>,
     which inteprets the rest of the URL as a Base64 encoded sequence of
     which inteprets the rest of the URL as a Base64 encoded sequence of
-    bytes to use as a source.  The other is <tt>utf8:</tt> which
+    bytes to use as a source.  The other is <t>utf8:</t> which
     interpretets the rest of the string as a Unicode character sequence to
     be UTF-8 encoded as a string of bytes to use as a source.
     
     <pre>
     interpretets the rest of the string as a Unicode character sequence to
     be UTF-8 encoded as a string of bytes to use as a source.
     
     <pre>
-      var r5 = ibex.stream.url("data:WFWE876WEh99sd76f");
-      var r6 = ibex.stream.url("utf8:this is a test");
+    var r5 = ibex.stream.url("data:WFWE876WEh99sd76f");
+    var r6 = ibex.stream.url("utf8:this is a test");
     </pre>
 
     You can read a UTF-8 encoded string from a stream like this:
     
     <pre>
     </pre>
 
     You can read a UTF-8 encoded string from a stream like this:
     
     <pre>
-      var myString = ibex.stream.fromUTF(ibex.stream.url("utf8:this is a test"));
+    var myString = ibex.stream.fromUTF(ibex.stream.url("utf8:this is a test"));
     </pre>
     You can also parse XML from a stream using SAX like this:
     
     <pre>
     </pre>
     You can also parse XML from a stream using SAX like this:
     
     <pre>
-      ibex.stream.xml.sax(ibex.stream.url("http://foo.com/foo.xml"),
-                         { beginElement : function(tagname, attributeKeyValuePairs) { ... },
-                           endElement   : function(tagname) { ... },
-                           content      : function(contentString) { ... }
-                           whitespace   : function(whitespaceString) { ... }
-                         });
+    ibex.stream.xml.sax(
+        ibex.stream.url("http://foo.com/foo.xml"),
+            { beginElement : function(tagname, attributeKeyValuePairs) { ... },
+              endElement   : function(tagname) { ... },
+              content      : function(contentString) { ... }
+              whitespace   : function(whitespaceString) { ... }
+            });
     </pre>
     
     </section>
     </pre>
     
     </section>
 <!-- ----------------------------------------------------------------------- -->
 <section title="The Ibex object">
 
 <!-- ----------------------------------------------------------------------- -->
 <section title="The Ibex object">
 
-    The <tt>ibex</tt> object is present in the top-level scope of every
+    The <t>ibex</t> object is present in the top-level scope of every
     script.  It has the following properties:
     
     script.  It has the following properties:
     
-  <section title="General">
+  <heading title="General"/>
 
     <property name="ibex.box">
         reading from this property returns a new box
 
     <property name="ibex.box">
         reading from this property returns a new box
         returns a blessed clone of stream
         </property>
 
         returns a blessed clone of stream
         </property>
 
-    </section>
-
-  <section title="ECMA Library Objects">
+  <heading title="ECMA Library Objects"/>
 
     <property name="ibex.date">
         reading from this property returns a new date
 
     <property name="ibex.date">
         reading from this property returns a new date
         this object contains the ECMA string manipulation functions
         </property>
 
         this object contains the ECMA string manipulation functions
         </property>
 
-    </section>
-
-  <section title="Logging">
+  <heading title="Logging"/>
 
     <property name="ibex.log.debug(m, o)">
         log the debug message <i>m</i>, optionally dumping object
 
     <property name="ibex.log.debug(m, o)">
         log the debug message <i>m</i>, optionally dumping object
         <i>o</i>
         </property>
 
         <i>o</i>
         </property>
 
-    </section>
-
-  </section>
-<!-- ----------------------------------------------------------------------- -->
-<section title="User Interface">
+    <heading title="User Interface"/>
 
     <property name="ibex.ui.browser(u)">
         opens a new browser window with URL <i>u</i>
 
     <property name="ibex.ui.browser(u)">
         opens a new browser window with URL <i>u</i>
         an object whose stream is a a builtin fixed-width font
         </property>
 
         an object whose stream is a a builtin fixed-width font
         </property>
 
-  <section title="Networking">
+  <heading title="Networking"/>
 
     <property name="ibex.net.http">
         not yet implemented
 
     <property name="ibex.net.http">
         not yet implemented
         SoapAction <i>a</i>, and XML Namespace <i>n</i>
         </property>
 
         SoapAction <i>a</i>, and XML Namespace <i>n</i>
         </property>
 
-    </section>
-
-  <section title="Threads">
+  <heading title="Threads"/>
 
     <property name="ibex.thread">
         when a function is written to this property, a new thread is
 
     <property name="ibex.thread">
         when a function is written to this property, a new thread is
         sleep for <i>n</i> milliseconds
         </property>
 
         sleep for <i>n</i> milliseconds
         </property>
 
-    </section>
-
-  <section title="Streams">
+  <heading title="Streams"/>
 
     <property name="ibex.stream.url(u)">
          returns a new object whose stream is drawn from URL <i>u</i>
 
     <property name="ibex.stream.url(u)">
          returns a new object whose stream is drawn from URL <i>u</i>
         </property>
 
     <property name="ibex.stream.parse.html(s, h)">
         </property>
 
     <property name="ibex.stream.parse.html(s, h)">
-        Same as <tt>parse.xml()</tt>, but tries to fix broken HTML.
+        Same as <t>parse.xml()</t>, but tries to fix broken HTML.
         </property>
 
     <property name="ibex.stream.parse.utf8(s)">
         </property>
 
     <property name="ibex.stream.parse.utf8(s)">
         </property>
 
     <property name="ibex.stream.homedir">
         </property>
 
     <property name="ibex.stream.homedir">
-        <tt>ibex.stream.tempdir</tt>
+        <t>ibex.stream.tempdir</t>
         </property>
 
         </property>
 
-    </section>
-
-  <section title="Cryptography">
+  <heading title="Cryptography"/>
 
     <property name="ibex.crypto.rsa(k,s)">
         <i>not implemented yet:</i> return a
 
     <property name="ibex.crypto.rsa(k,s)">
         <i>not implemented yet:</i> return a
         SHA1-hash stream <i>s</i>
         </property>
 
         SHA1-hash stream <i>s</i>
         </property>
 
-    </section>
-
-  </section>
+</section>
 <!-- ----------------------------------------------------------------------- -->
 <section title="Traps">
 
 <!-- ----------------------------------------------------------------------- -->
 <section title="Traps">
 
-  <section title="Simple Traps">
-
-    You can add a trap to a property by applying the <tt>++=</tt> operator
+    You can add a trap to a property by applying the <t>++=</t> operator
     to a function with one argument.  The trap will be invoked whenever
     that property is written to.
     
     <pre>
     to a function with one argument.  The trap will be invoked whenever
     that property is written to.
     
     <pre>
-        <box>
-            foo ++= function(z) {
-               ibex.log.info("foo is " + z);
-            }
-        </box>
+    <box>
+        foo ++= function(z) {
+           ibex.log.info("foo is " + z);
+        }
+    </box>
     </pre>
 
     </pre>
 
-    If another script were to set the property "<tt>foo</tt>"
-    on the box above to the value <tt>5</tt>, the function above would be
-    invoked with the argument <tt>5</tt>. The function would then log
-    the string "<tt>foo is 5</tt>".
+    If another script were to set the property "<t>foo</t>"
+    on the box above to the value <t>5</t>, the function above would be
+    invoked with the argument <t>5</t>. The function would then log
+    the string "<t>foo is 5</t>".
     
     
-    Within a trap, the expression <tt>trapee</tt> can be used to
+    Within a trap, the expression <t>trapee</t> can be used to
     get a reference to the box on which the trap was placed.
     
     get a reference to the box on which the trap was placed.
     
-    The expression <tt>trapname</tt> returns the name of the
+    The expression <t>trapname</t> returns the name of the
     trap executing the current function. This is useful when a function
     is applied to multiple traps. For example:
     
     <pre>
     trap executing the current function. This is useful when a function
     is applied to multiple traps. For example:
     
     <pre>
-        <box>
-            func ++= function(z) {
-                ibex.log.info("called trap " + trapname);
-            }
-            foo ++= func;
-            bar ++= func;
-        </box>
+    <box>
+        func ++= function(z) {
+            ibex.log.info("called trap " + trapname);
+        }
+        foo ++= func;
+        bar ++= func;
+    </box>
     </pre>
     
     </pre>
     
-    </section>
-
   <section title="Removing Traps">
 
   <section title="Removing Traps">
 
-    You can remove a trap by using the <tt>--=</tt> operator with the same
+    You can remove a trap by using the <t>--=</t> operator with the same
     function you added as a trap:
     
     <pre>
     function you added as a trap:
     
     <pre>
-        <box>
-            var myfunc = function(z) { /* ... */ }
-            // add the trap
-            func ++= myfunc;
-            // ...
-            // remove the trap
-            func --= myfunc;
-        </box>
+    <box>
+        var myfunc = function(z) { /* ... */ }
+        // add the trap
+        func ++= myfunc;
+        // ...
+        // remove the trap
+        func --= myfunc;
+    </box>
     </pre>
     
     </section>
 
     </pre>
     
     </section>
 
-  <section title="Multiple Traps on the Same Property">
+  <heading title="Multiple Traps on the Same Property"/>
 
     When the property is <i>written</i> to, each of the trap functions placed
     on it will be invoked in the opposite order that they were placed on
 
     When the property is <i>written</i> to, each of the trap functions placed
     on it will be invoked in the opposite order that they were placed on
     are objects, so they can hold properties just like all other
     ECMAscript objects).
     
     are objects, so they can hold properties just like all other
     ECMAscript objects).
     
-    </section>
-
   <section title="Manual Cascades">
 
     There are two additional tricks you can use when placing traps. The
     first is a <i>manual cascade</i>. If you want to cascade to lower
     traps in the middle of a function, or you want to cascade with a
     different value than the value passed to you (in effect "lying" to
   <section title="Manual Cascades">
 
     There are two additional tricks you can use when placing traps. The
     first is a <i>manual cascade</i>. If you want to cascade to lower
     traps in the middle of a function, or you want to cascade with a
     different value than the value passed to you (in effect "lying" to
-    lower traps), you can use <tt>cascade</tt>. For example:
+    lower traps), you can use <t>cascade</t>. For example:
     
     <pre>
     
     <pre>
-        <box color="black">
-            color ++= function(c) {
-                ibex.log.info("refusing to change colors!");
-                cascade = "black";
-            }
-        </box>
+    <box color="black">
+        color ++= function(c) {
+            ibex.log.info("refusing to change colors!");
+            cascade = "black";
+        }
+    </box>
     </pre>
 
     This effectively creates a box whose color cannot be changed, and
     </pre>
 
     This effectively creates a box whose color cannot be changed, and
     Do <i>not</i> try to do something like this:
     
     <pre>
     Do <i>not</i> try to do something like this:
     
     <pre>
-        <box color="black">
-            color ++= function(z) {
-                color = "black";      // INFINITE LOOP! BAD!!!
-            }
-        </box>
+    <box color="black">
+        color ++= function(z) {
+            color = "black";      // INFINITE LOOP! BAD!!!
+        }
+    </box>
     </pre>
     </pre>
-    To prevent automatic cascading, return <tt>true</tt> from your function:
+    To prevent automatic cascading, return <t>true</t> from your function:
     
     <pre>
     
     <pre>
-        <box color="black">
-            color ++= function(z) {
-                return true;          // the box's color will not change
-            }
-        </box>
+    <box color="black">
+        color ++= function(z) {
+            return true;          // the box's color will not change
+        }
+    </box>
     </pre>
 
     </section>
     </pre>
 
     </section>
     also do not automatically cascade.
     
     <pre>
     also do not automatically cascade.
     
     <pre>
-        <box>
-            doublewidth <tt>++=</tt> function() { return 2 * width; }
-        </box>
+    <box>
+        doublewidth <t>++=</t> function() { return 2 * width; }
+    </box>
     </pre>
 
     </pre>
 
-    If another script attempts to read from the <tt>doublewidth</tt>
+    If another script attempts to read from the <t>doublewidth</t>
     property on this box, the value it gets will be twice the actual width
     of the box.  Note that
     property on this box, the value it gets will be twice the actual width
     of the box.  Note that
-    the actual <tt>doublewidth</tt> property on the box never gets written
+    the actual <t>doublewidth</t> property on the box never gets written
     to, since the trap does not cascade.
     
     You can manually cascade on read traps as well:
     
     <pre>
     to, since the trap does not cascade.
     
     You can manually cascade on read traps as well:
     
     <pre>
-        <box>
-            text <tt>++=</tt> function() { return "my text is " + cascade; }
-        </box>
+    <box>
+        text <t>++=</t> function() { return "my text is " + cascade; }
+    </box>
     </pre>
 
     Read traps are only rarely needed -- most of the time a write trap
     </pre>
 
     Read traps are only rarely needed -- most of the time a write trap
     
     </section>
 
     
     </section>
 
-  <section title="Prohibited Traps">
+  <heading title="Prohibited Traps"/>
 
     To prevent confusing and hard-to-debug behaviors, scripts may not
     place traps on any of the properties described in the sections
 
     To prevent confusing and hard-to-debug behaviors, scripts may not
     place traps on any of the properties described in the sections
-    <link section="Box Layout Properties"/>, <link
+    <link text="Box Layout Properties" section="Layout Properties"/>, <link
     section="Child-Control Properties"/>, or <link section="Other Box
     section="Child-Control Properties"/>, or <link section="Other Box
-    Properties"/> except for <tt>childadded</tt>,
-    <tt>childremoved</tt> and <tt>surface</tt>.  FIXME: remove?
+    Properties"/> except for <t>childadded</t>,
+    <t>childremoved</t> and <t>surface</t>.  FIXME: remove?
     
     
-    </section>
-
-  <section title="Exceptions and Traps ">
+  <heading title="Exceptions and Traps "/>
 
     If an uncaught exception is thrown from a trap, Ibex will log the
     exception, but will <i>not</i> propagate it to the code which
     triggered the trap. If the trap was a read trap, the value
 
     If an uncaught exception is thrown from a trap, Ibex will log the
     exception, but will <i>not</i> propagate it to the code which
     triggered the trap. If the trap was a read trap, the value
-    <tt>null</tt> will be returned.
+    <t>null</t> will be returned.
     FIXME: is this right?
     FIXME: is this right?
-    </section>
 
 
-  <section title="Architectural Significance of Traps">
+  <heading title="Architectural Significance of Traps"/>
 
     Traps are the backbone of Ibex. Since almost all UI programming is
     event/demand driven, traps eliminate the need for separate
     member/getter/setter declarations, often cutting the amount of typing
     you have to do to a third of what it would normally be.
 
     Traps are the backbone of Ibex. Since almost all UI programming is
     event/demand driven, traps eliminate the need for separate
     member/getter/setter declarations, often cutting the amount of typing
     you have to do to a third of what it would normally be.
-    </section>
 
   <section title="Cloning">
 
     <i>Cloning</i> is a companion technique for traps; together they can
     be used to simulate any sort of environment you might need.  When you
 
   <section title="Cloning">
 
     <i>Cloning</i> is a companion technique for traps; together they can
     be used to simulate any sort of environment you might need.  When you
-    call <tt>ibex.clone(o)</tt>, Ibex returns a new object (called the
-    <i>clone</i>) which compares with equality (<tt>==</tt>) to the
+    call <t>ibex.clone(o)</t>, Ibex returns a new object (called the
+    <i>clone</i>) which compares with equality (<t>==</t>) to the
     original object.  Furthermore, both objects are "equal" as keys in
     hashtables, so:
     
     <pre>
     original object.  Furthermore, both objects are "equal" as keys in
     hashtables, so:
     
     <pre>
-       var hash = {};
-       var theclone = ibex.clone(o);
-       hash[o] = 5;
-       ibex.log.info(hash[theclone]);    // prints "5"
+    var hash = {};
+    var theclone = ibex.clone(o);
+    hash[o] = 5;
+    ibex.log.info(hash[theclone]);    // prints "5"
     </pre>
 
     Any writes to properties on the clone will actually write to
     </pre>
 
     Any writes to properties on the clone will actually write to
     
     </section>
 
     
     </section>
 
-  <section title="Ibex self-emulation">
-
-    When the core first starts up, it clones the <tt>ibex</tt> object,
-    creates a stream for the initial .ibex, and then places a trap on the
-    cloned <tt>ibex</tt> object so that its empty-string property returns
-    the .ibex stream.  The cloned Ibex object is then passed as the third
-    (optional) argument to <tt>ibex.apply()</tt>, making it the default
-    <tt>ibex</tt> object for the scripts that are executed as part of the
-    template instantiation.
-    
-    <pre>
-       var new_ibex = ibex.clone(ibex);
-       var stream = ibex.bless(ibex.stream.url("http://..."));
-       new_ibex[""] ++= function() { return stream; }
-       ibex.apply(ibex.box, new_ibex..main, new_ibex);
-    </pre>
-
-    Note that we called <tt>ibex.bless()</tt> on the stream before tacking
-    it on to the new Ibex object.  The bless function returns a clone of
-    the object passed to it, with a few traps which are explained below.
-    Additionally, any sub-streams retrieved by accessing properties of the
-    blessed stream will also automatically be blessed (blessed streams are
-    <i>monadic</i>).
-    
-    Blessing a stream serves three purposes:
-    
-    <list type="unordered">
-        
-        Blessed clones always return the appropriate static block when
-        their empty property is accessed; this ensures that references
-        to the static blocks of other templates work properly.
-        
-        Blessed substreams can return their parent stream by accessing
-        a hidden property which is reserved for internal use by Ibex.
-        This ensures that Ibex can automatically add filename
-        extensions where needed, according to the following rules:
-
-        <list>
-            If the stream is a template to be applied, the string
-            "<tt>.ibex</tt>" is appended.
-        
-            If the stream is an image, the string "<tt>.png</tt>" is
-            appended.  If no stream is found, "<tt>.jpeg</tt>" and
-            "<tt>.gif</tt>" are tried, in that order.
-        
-            If the stream is an font, the string "<tt>.ttf</tt>" is
-            appended.
-        </list>
-        
-        Every call to <tt>ibex.bless()</tt> returns a different object
-        (which happens to be a clone of the object passed to it) with
-        a completely separate set of static blocks.
-
-    </list>
-
-    Ibex can self-emulate by using <tt>ibex.clone()</tt> on the Ibex object;
-    this technique is very similar to the use of ClassLoaders in
-    Java. This is useful for a number of applications, including
-    debuggers, IDEs, sandboxing untrusted code, remote-control, and
-    others.  For example:
-    
-    <pre>
-       var newLoadFunction = function(url) { /* ... */ };
-       var new_ibex = ibex.clone(ibex);
-       new_ibex.load ++= function() { return newLoadFunction; }
-       ibex.apply(ibex.box, .main, new_ibex);
-    </pre>
-
-    </section>
 
 
-  </section>
 <!-- ----------------------------------------------------------------------- -->
 <!-- ----------------------------------------------------------------------- -->
-<section title="Contexts and Threading">
+<section title="Threads">
 
   <section title="Contexts">
 
 
   <section title="Contexts">
 
         
         <b>Event Context</b> (executing javascript traps triggered by an event)
         
         
         <b>Event Context</b> (executing javascript traps triggered by an event)
         
-        <b>Thread Context</b> (executing a background thread spawned with <tt>ibex.thread</tt>)
+        <b>Thread Context</b> (executing a background thread spawned with <t>ibex.thread</t>)
 
     </list>
     
 
     </list>
     
     
     <list type="unordered">
 
     
     <list type="unordered">
 
-        The <tt>box.mouse</tt> property and its subproperties
-        (<tt>x</tt>, <tt>y</tt>, and <tt>inside</tt>) can only be read
+        The <t>box.mouse</t> property and its subproperties
+        (<t>x</t>, <t>y</t>, and <t>inside</t>) can only be read
         from within the Event Context, or in a thread context
         from within the Event Context, or in a thread context
-        <i>after</i> a the <tt>box.mouse</tt> property on this box or
+        <i>after</i> a the <t>box.mouse</t> property on this box or
         an ancestor box has been written to.
         
         Blocking operations (anything that accesses the network or
         an ancestor box has been written to.
         
         Blocking operations (anything that accesses the network or
   <section title="Background Threads">
 
     Ibex offers easy access to threads. Spawning a background thread is as
   <section title="Background Threads">
 
     Ibex offers easy access to threads. Spawning a background thread is as
-    simple as writing a function to the <tt>ibex.thread</tt> property:
+    simple as writing a function to the <t>ibex.thread</t> property:
     
     <pre>
     
     <pre>
-        ibex.thread = function() {
-            ibex.log.info("this is happening in a background thread!");
-        }
+    ibex.thread = function() {
+        ibex.log.info("this is happening in a background thread!");
+    }
     </pre>
 
     The argument set passed to the function is currently undefined and is
     </pre>
 
     The argument set passed to the function is currently undefined and is
     few milliseconds.
     
     </section>
     few milliseconds.
     
     </section>
+</section>
 
 
-  <section title="Events">
+<section title="Events">
 
     Every execution of the Event Context begins with an event, which
     consists of a key/value pair, and a mouse position, which consists of
 
     Every execution of the Event Context begins with an event, which
     consists of a key/value pair, and a mouse position, which consists of
-    an x and y coordinate.  The possible keys are <tt>_Press[1-3]</tt>,
-    <tt>_Release[1-3]</tt>, <tt>_Click[1-3]</tt>, <tt>_DoubleClick[1-3]</tt>,
-    <tt>_Move</tt>, <tt>_KeyPressed</tt>, and <tt>_KeyReleased</tt>.
+    an x and y coordinate.  The possible keys are <t>_Press[1-3]</t>,
+    <t>_Release[1-3]</t>, <t>_Click[1-3]</t>, <t>_DoubleClick[1-3]</t>,
+    <t>_Move</t>, <t>_KeyPressed</t>, and <t>_KeyReleased</t>.
     
     Here are two example events:
     
     
     Here are two example events:
     
     example prints out "first second third fourth" in that order.
     
     <pre>
     example prints out "first second third fourth" in that order.
     
     <pre>
-          <box>
-              _Press1 ++= function(b) { ibex.log.info("first"); }
-               Press1 ++= function(b) { ibex.log.info("fourth"); }
-              <box>
-                _Press1 ++= function(b) { ibex.log.info("second"); }
-                 Press1 ++= function(b) { ibex.log.info("third"); }
-              </box>
-          </box>
+    <box>
+        _Press1 ++= function(b) { ibex.log.info("first"); }
+         Press1 ++= function(b) { ibex.log.info("fourth"); }
+        <box>
+          _Press1 ++= function(b) { ibex.log.info("second"); }
+           Press1 ++= function(b) { ibex.log.info("third"); }
+        </box>
+    </box>
     </pre>
 
     In general, you should use the <i>non-underscore</i> names to respond
     </pre>
 
     In general, you should use the <i>non-underscore</i> names to respond
     
     </section>
 
     
     </section>
 
-  <section title="Stopping the Process">
+  <heading title="Stopping the Process"/>
 
     At any point in this sequence, a trap handler can choose not to
 
     At any point in this sequence, a trap handler can choose not to
-    cascade (by returning <tt>true</tt> from the trap handler function).
+    cascade (by returning <t>true</t> from the trap handler function).
     This will immediately cease the propagation of the event.  This is how
     you would indicate that an event has been "handled".
     
     This will immediately cease the propagation of the event.  This is how
     you would indicate that an event has been "handled".
     
-    </section>
-
-  <section title="Re-routing events">
-
-    At any point in the Event Context, you can write to the <tt>mouse</tt>
-    property on any box.  The value written should be an object with two
-    properties, <tt>x</tt> and <tt>y</tt>.  For example:
-    
-    <pre>
-        _Press1 ++= function(p) {
-            mouse = { x: 32, y: 77 };
-        }
-    </pre>
+  <heading title="Enter and Leave"/>
 
 
-    The coordinates specified are relative to the box whose <tt>mouse</tt>
-    property is being written to.  There is no need to supply the
-    <tt>inside</tt> property; it is computed automatically.  Writing to
-    the <tt>mouse</tt> property causes Ibex to recompute the eventual
-    target box, and also alter the values returned by <tt>mouse.x</tt>,
-    <tt>mouse.y</tt>, and <tt>mouse.inside</tt> for any <i>descendants</i>
-    of the current box.  Writing to the <tt>mouse</tt> property also
-    automatically prevents the event from returning to the box's parents
-    -- it is equivalent to not cascading on the non-underscored event.
-    This ensures that child boxes cannot trick their parent boxes into
-    thinking that the mouse has moved.
-    
-    If you want the event to "skip over" the boxes between the trapee
-    and the target, or if you want to re-route an event to a box which
-    is not a descendant of the current box, simply write the value to
-    the proper key on the target box.
-    
-    <pre>
-         <box>
-             _KeyPressed = function(k) { ibex.log.info("first"); }
-              KeyPressed = function(k) { ibex.log.info("sixth"); }
-             $recipient.target = $target;
-             <box id="recipient">
-                 _KeyPressed = function(k) {
-                     ibex.log.info("second");
-                     thisbox.target.KeyPressed = k;
-                     // inhibit cascade to keep the event from going to $excluded
-                     return true;
-                 }
-                  KeyPressed = function(k) { ibex.log.info("fifth"); }
-                 <box id="excluded">
-                     _KeyPressed = function(k) { ibex.log.info("this never happens"); }
-                 </box>
-             </box>
-             <box id="target"> 
-                 _KeyPressed = function(k) { ibex.log.info("third"); }
-                  KeyPressed = function(k) { ibex.log.info("fourth"); }
-             </box>
-         </box>
-    </pre>
-
-    </section>
-
-  <section title="Synthesizing Your Own Events">
-
-    You can create "fake events" by simply writing to the <tt>mouse</tt>
-    property and then writing a value to one of the underscored properties
-    on a box.  This will have exactly the same effect as if the use had
-    actually pressed a key, clicked a button, or moved the mouse -- they
-    are indistinguishable.
-    
-    </section>
-
-  <section title="Enter and Leave">
-
-    Ibex will trigger the <tt>Enter</tt> and <tt>Leave</tt> properties as
+    Ibex will trigger the <t>Enter</t> and <t>Leave</t> properties as
     it walks down the tree, based on the position of the mouse (or the
     it walks down the tree, based on the position of the mouse (or the
-    faked position if the <tt>mouse</tt> property has been written to).
-    However, <tt>Enter</tt> and <tt>Leave</tt> are not events since they
+    faked position if the <t>mouse</t> property has been written to).
+    However, <t>Enter</t> and <t>Leave</t> are not events since they
     do not implicitly cascade up or down the tree.
     
     do not implicitly cascade up or down the tree.
     
-    </section>
-
-  <section title="Detailed Description of Events">
+  <section title="Listing of Events">
     
     <property name="Press1 / Press2 / Press3">
         Indicates that the use has pressed a mouse button.  On
     
     <property name="Press1 / Press2 / Press3">
         Indicates that the use has pressed a mouse button.  On
         If the shift key was depressed immediately before the event
         took place, then the string will be capitalized. Special
         keynames are also capitalized; shift+home is reported as
         If the shift key was depressed immediately before the event
         took place, then the string will be capitalized. Special
         keynames are also capitalized; shift+home is reported as
-        "<tt>HOME</tt>". Symbols are capitalized as they appear on the
+        "<t>HOME</t>". Symbols are capitalized as they appear on the
         keyboard; for example, on an American QWERTY keyboard, shift+2
         keyboard; for example, on an American QWERTY keyboard, shift+2
-        is reported as "<tt>@</tt>".  If the alt, meta, or command key
+        is reported as "<t>@</t>".  If the alt, meta, or command key
         was depressed immediately before this key was pressed, then
         was depressed immediately before this key was pressed, then
-        the string will be prefixed with the string "<tt>A-</tt>". If
+        the string will be prefixed with the string "<t>A-</t>". If
         the control key was depressed while this key was pressed, then
         the control key was depressed while this key was pressed, then
-        the string will be prefixed with the string "<tt>C-</tt>". If
+        the string will be prefixed with the string "<t>C-</t>". If
         both alt and control are depressed, the string is prefixed
         both alt and control are depressed, the string is prefixed
-        with "<tt>C-A-</tt>".  Ibex does not distinguish between a key
+        with "<t>C-A-</t>".  Ibex does not distinguish between a key
         press resulting from the user physically pushing down a key,
         and a 'key press' resulting from the keyboard's typematic
         repeat. In the rare case that an application needs to
         press resulting from the user physically pushing down a key,
         and a 'key press' resulting from the keyboard's typematic
         repeat. In the rare case that an application needs to
 
     </section>
 
 
     </section>
 
-  </section>
+</section>
 
 <!-- ----------------------------------------------------------------------- -->
 <section title="Networking">
     
   <section title="XML-RPC">
     
 
 <!-- ----------------------------------------------------------------------- -->
 <section title="Networking">
     
   <section title="XML-RPC">
     
-    XML-RPC objects can be created by calling <tt>ibex.net.rpc.xml(<i>XML-RPC
-    URL</i>)</tt>, and then invoking methods on that object. For example,
+    XML-RPC objects can be created by calling <t>ibex.net.rpc.xml(<i>XML-RPC
+    URL</i>)</t>, and then invoking methods on that object. For example,
     
     <pre>
     
     <pre>
-        Press1 += function(v) {
-            ibex.thread = function() {
-                color = ibex.net.rpc.xml("http://xmlrpc.ibex.org/RPC2/").color.getTodaysColor("Friday");
-            }
+    Press1 += function(v) {
+        ibex.thread = function() {
+            color = ibex.net.rpc.xml("http://xmlrpc.ibex.org/RPC2/").
+                       color.getTodaysColor("Friday");
         }
         }
+    }
     </pre>
     
     When the user clicks the first mouse button on this box, it will
     </pre>
     
     When the user clicks the first mouse button on this box, it will
-    contact the server <tt>xmlrpc.ibex.org</tt>, route to the
-    <tt>/RPC2/</tt> handler and invoke the <tt>getTodaysColor()</tt>
-    method on the <tt>color</tt> object with a single string argument
-    "<tt>Friday</tt>". The return value will be used to change the color
+    contact the server <t>xmlrpc.ibex.org</t>, route to the
+    <t>/RPC2/</t> handler and invoke the <t>getTodaysColor()</t>
+    method on the <t>color</t> object with a single string argument
+    "<t>Friday</t>". The return value will be used to change the color
     of the box the user clicked on.
     
     Note that in this example we spawned a background thread to handle the
     of the box the user clicked on.
     
     Note that in this example we spawned a background thread to handle the
-    request -- the <tt>Press1</tt> event is delivered in the foreground
+    request -- the <t>Press1</t> event is delivered in the foreground
     thread, and XML-RPC methods may only be invoked in background
     threads. This is to prevent the UI from "locking up" if the server
     takes a long time to reply.
     
     If the XML-RPC method faults, an object will be thrown with two
     thread, and XML-RPC methods may only be invoked in background
     threads. This is to prevent the UI from "locking up" if the server
     takes a long time to reply.
     
     If the XML-RPC method faults, an object will be thrown with two
-    properties: <tt>faultCode</tt> and <tt>faultString</tt>, as defined in
+    properties: <t>faultCode</t> and <t>faultString</t>, as defined in
     the <link url="http://www.xmlrpc.org/spec" text="XML-RPC specification"/>. If
     Ibex encounters a network, transport, or session-layer error, it will
     the <link url="http://www.xmlrpc.org/spec" text="XML-RPC specification"/>. If
     Ibex encounters a network, transport, or session-layer error, it will
-    throw a <tt>String</tt> object describing the error in a
+    throw a <t>String</t> object describing the error in a
     human-readable format. Scripts should not rely on the contents of
     this string having any special structure or significance.
     
     human-readable format. Scripts should not rely on the contents of
     this string having any special structure or significance.
     
     element. If a <base64/> element is found in the XML-RPC reply, it
     will be returned as an object with a stream drawn from that byte sequence.
     
     element. If a <base64/> element is found in the XML-RPC reply, it
     will be returned as an object with a stream drawn from that byte sequence.
     
-    Each object returned by <tt>ibex.net.rpc.xml()</tt> represents a
+    Each object returned by <t>ibex.net.rpc.xml()</t> represents a
     single HTTP connection.  The connection will be held open until
     the object is garbage collected or the server closes the
     connection.  If a second call is issued on the object before the
     single HTTP connection.  The connection will be held open until
     the object is garbage collected or the server closes the
     connection.  If a second call is issued on the object before the
     text="pipelined"/>.  This can dramatically improve performance.
     
     Ibex supports HTTP Basic and Digest authentication. To use
     text="pipelined"/>.  This can dramatically improve performance.
     
     Ibex supports HTTP Basic and Digest authentication. To use
-    authentication, pass <tt>ibex.net.rpc.xml()</tt> a URL in the form
-    <tt>http[s]://user:password@hostname/</tt>.  Ibex will use Digest
+    authentication, pass <t>ibex.net.rpc.xml()</t> a URL in the form
+    <t>http[s]://user:password@hostname/</t>.  Ibex will use Digest
     authentication if the server supports it; otherwise it will use
     Basic authentication.  Please be aware that many XML-RPC server
     implementations contain a <link
     authentication if the server supports it; otherwise it will use
     Basic authentication.  Please be aware that many XML-RPC server
     implementations contain a <link
     
     <list type="ordered">
 
     
     <list type="ordered">
 
-        <tt>ibex.net.rpc.soap()</tt> is used instead of
-        <tt>ibex.net.rpc.xml()</tt>
+        <t>ibex.net.rpc.soap()</t> is used instead of
+        <t>ibex.net.rpc.xml()</t>
         
         Instead of specifying just the URL of the service itself, you
         must specify the URL, the SOAPAction argument, and the
         
         Instead of specifying just the URL of the service itself, you
         must specify the URL, the SOAPAction argument, and the
     </list>
     
     SOAP faults are handled the same way as XML-RPC faults except that the
     </list>
     
     SOAP faults are handled the same way as XML-RPC faults except that the
-    capitalization of the <tt>faultstring</tt> and <tt>faultcode</tt>
+    capitalization of the <t>faultstring</t> and <t>faultcode</t>
     members is all lower-case, to match the SOAP spec. Here is a
     SOAP example:
     
     <pre>
     members is all lower-case, to match the SOAP spec. Here is a
     SOAP example:
     
     <pre>
-        Press1 ++= function(v) {
-            ibex.thread = function() {
-                color = ibex.net.rpc.soap("http://soap.ibex.org/SOAP",   // endpoint
-                                         "GETTODAYSCOLOR",             // SOAPAction header
-                                         "http://ibex.org/namespace"    // namespace for SOAP-ENV
-                                    ).color.getTodaysColor( {
-                                        whichday : Friday
-                                    } );
-            }
+    Press1 ++= function(v) {
+        ibex.thread = function() {
+            color = ibex.net.rpc.soap("http://soap.ibex.org/SOAP",
+                                     "GETTODAYSCOLOR",            
+                                     "http://ibex.org/namespace"  
+                                ).color.getTodaysColor( {
+                                    whichday : Friday
+                                } );
         }
         }
+    }
     </pre>
 
     As you can see, SOAP is much more verbose, yet does not offer
     </pre>
 
     As you can see, SOAP is much more verbose, yet does not offer
     applications.
     
     The current Ibex SOAP stack does not support 'document style' or
     applications.
     
     The current Ibex SOAP stack does not support 'document style' or
-    multi-ref (<tt>href</tt>) data structures.
+    multi-ref (<t>href</t>) data structures.
     
     </section>
 
     
     </section>
 
     For example:
     
     <pre>
     For example:
     
     <pre>
-       "ibex.net.dns.unknownhostexception: unable to resolve host foo.com"
+    "ibex.net.dns.unknownhostexception: unable to resolve host foo.com"
     </pre>
 
     The code should be used to determine how the program should respond to
     </pre>
 
     The code should be used to determine how the program should respond to
         </property>
     <property name="ibex.net.security.prohibitedHost">
         A piece of untrusted Ibex code attempted to contact a
         </property>
     <property name="ibex.net.security.prohibitedHost">
         A piece of untrusted Ibex code attempted to contact a
-        restricted host.  See <ref appendix="Security Architecture and Considerations"/> for details.
+        restricted host.  See <link appendix="Security Architecture and Considerations"/> for details.
         </property>
     <property name="ibex.net.dns.temporaryFailure">
         An attempt to resolve a hostname failed but it is not known
         </property>
     <property name="ibex.net.dns.temporaryFailure">
         An attempt to resolve a hostname failed but it is not known
         </property>
     <property name="ibex.net.http.">
         Thrown when an HTTP error code is returned during an
         </property>
     <property name="ibex.net.http.">
         Thrown when an HTTP error code is returned during an
-            operation.  The three characters <tt><i>xyz</i></tt> will be
+            operation.  The three characters <t><i>xyz</i></t> will be
             the three-digit HTTP status code.
         </property>
     <property name="ibex.net.xmlrpc.null">
             the three-digit HTTP status code.
         </property>
     <property name="ibex.net.xmlrpc.null">
-        The caller attempted to transmit the <tt>null</tt> value via XML-RPC.
+        The caller attempted to transmit the <t>null</t> value via XML-RPC.
         </property>
     <property name="ibex.net.xmlrpc.circular">
         The caller attempted to transmit a circular data structure via XML-RPC.
         </property>
     <property name="ibex.net.xmlrpc.circular">
         The caller attempted to transmit a circular data structure via XML-RPC.
         XML-RPC (for example, a Box or the Ibex object).
         </property>
     <property name="ibex.null.put">
         XML-RPC (for example, a Box or the Ibex object).
         </property>
     <property name="ibex.null.put">
-        A JavaScript attempted to put to a property on the <tt>null</tt> value
+        A JavaScript attempted to put to a property on the <t>null</t> value
         </property>
     <property name="ibex.null.get">
         </property>
     <property name="ibex.null.get">
-        A JavaScript attempted to get from a property on the <tt>null</tt> value
+        A JavaScript attempted to get from a property on the <t>null</t> value
         </property>
     <property name="ibex.null.call">
         </property>
     <property name="ibex.null.call">
-        A JavaScript attempted to call the <tt>null</tt> value
+        A JavaScript attempted to call the <t>null</t> value
         </property>
     
     If an exception is thrown inside a trap, the exception will propagate
         </property>
     
     If an exception is thrown inside a trap, the exception will propagate
     If an uncaught exception is thrown while applying a template, or the
     requested template could not be found, an error will be logged and the
     box to which the template was being applied will be made invisible
     If an uncaught exception is thrown while applying a template, or the
     requested template could not be found, an error will be logged and the
     box to which the template was being applied will be made invisible
-    (<tt>visible = false</tt>).  This ensures that half-applied widgets are
+    (<t>visible = false</t>).  This ensures that half-applied widgets are
     never shown to the user.
     
   </section>
 
 <!-- ----------------------------------------------------------------------- -->
     never shown to the user.
     
   </section>
 
 <!-- ----------------------------------------------------------------------- -->
+<section title="Advanced Topics">
+
+  <section title="Re-routing events">
+
+    At any point in the Event Context, you can write to the <t>mouse</t>
+    property on any box.  The value written should be an object with two
+    properties, <t>x</t> and <t>y</t>.  For example:
+    
+    <pre>
+    _Press1 ++= function(p) {
+        mouse = { x: 32, y: 77 };
+    }
+    </pre>
+
+    The coordinates specified are relative to the box whose <t>mouse</t>
+    property is being written to.  There is no need to supply the
+    <t>inside</t> property; it is computed automatically.  Writing to
+    the <t>mouse</t> property causes Ibex to recompute the eventual
+    target box, and also alter the values returned by <t>mouse.x</t>,
+    <t>mouse.y</t>, and <t>mouse.inside</t> for any <i>descendants</i>
+    of the current box.  Writing to the <t>mouse</t> property also
+    automatically prevents the event from returning to the box's parents
+    -- it is equivalent to not cascading on the non-underscored event.
+    This ensures that child boxes cannot trick their parent boxes into
+    thinking that the mouse has moved.
+    
+    If you want the event to "skip over" the boxes between the trapee
+    and the target, or if you want to re-route an event to a box which
+    is not a descendant of the current box, simply write the value to
+    the proper key on the target box.
+    
+    <pre>
+    <box>
+        _KeyPressed = function(k) { ibex.log.info("first"); }
+         KeyPressed = function(k) { ibex.log.info("sixth"); }
+        $recipient.target = $target;
+        <box id="recipient">
+            _KeyPressed = function(k) {
+                ibex.log.info("second");
+                thisbox.target.KeyPressed = k;
+                // inhibit cascade; keep event from going to $excluded
+                return true;
+            }
+             KeyPressed = function(k) { ibex.log.info("fifth"); }
+            <box id="excluded">
+                _KeyPressed = function(k) {
+                   ibex.log.info("this never happens");
+                }
+            </box>
+        </box>
+        <box id="target"> 
+            _KeyPressed = function(k) { ibex.log.info("third"); }
+             KeyPressed = function(k) { ibex.log.info("fourth"); }
+        </box>
+    </box>
+    </pre>
+
+    </section>
+
+  <section title="Synthesizing Your Own Events">
+
+    You can create "fake events" by simply writing to the <t>mouse</t>
+    property and then writing a value to one of the underscored properties
+    on a box.  This will have exactly the same effect as if the use had
+    actually pressed a key, clicked a button, or moved the mouse -- they
+    are indistinguishable.
+    
+    </section>
+
+  <section title="Ibex self-emulation">
+
+    When the core first starts up, it clones the <t>ibex</t> object,
+    creates a stream for the initial .ibex, and then places a trap on the
+    cloned <t>ibex</t> object so that its empty-string property returns
+    the .ibex stream.  The cloned Ibex object is then passed as the third
+    (optional) argument to <t>ibex.apply()</t>, making it the default
+    <t>ibex</t> object for the scripts that are executed as part of the
+    template instantiation.
+    
+    <pre>
+    var new_ibex = ibex.clone(ibex);
+    var stream = ibex.bless(ibex.stream.url("http://..."));
+    new_ibex[""] ++= function() { return stream; }
+    ibex.apply(ibex.box, new_ibex..main, new_ibex);
+    </pre>
+
+    Note that we called <t>ibex.bless()</t> on the stream before tacking
+    it on to the new Ibex object.  The bless function returns a clone of
+    the object passed to it, with a few traps which are explained below.
+    Additionally, any sub-streams retrieved by accessing properties of the
+    blessed stream will also automatically be blessed (blessed streams are
+    <i>monadic</i>).
+    
+    Blessing a stream serves three purposes:
+    
+    <list type="unordered">
+        
+        Blessed clones always return the appropriate static block when
+        their empty property is accessed; this ensures that references
+        to the static blocks of other templates work properly.
+        
+        Blessed substreams can return their parent stream by accessing
+        a hidden property which is reserved for internal use by Ibex.
+        This ensures that Ibex can automatically add filename
+        extensions where needed, according to the following rules:
+
+        <list>
+            If the stream is a template to be applied, the string
+            "<t>.ibex</t>" is appended.
+        
+            If the stream is an image, the string "<t>.png</t>" is
+            appended.  If no stream is found, "<t>.jpeg</t>" and
+            "<t>.gif</t>" are tried, in that order.
+        
+            If the stream is an font, the string "<t>.ttf</t>" is
+            appended.
+        </list>
+        
+        Every call to <t>ibex.bless()</t> returns a different object
+        (which happens to be a clone of the object passed to it) with
+        a completely separate set of static blocks.
+
+    </list>
+
+    Ibex can self-emulate by using <t>ibex.clone()</t> on the Ibex object;
+    this technique is very similar to the use of ClassLoaders in
+    Java. This is useful for a number of applications, including
+    debuggers, IDEs, sandboxing untrusted code, remote-control, and
+    others.  For example:
+    
+    <pre>
+    var newLoadFunction = function(url) { /* ... */ };
+    var new_ibex = ibex.clone(ibex);
+    new_ibex.load ++= function() { return newLoadFunction; }
+    ibex.apply(ibex.box, .main, new_ibex);
+    </pre>
+  </section>
+</section>
+
+<!-- ----------------------------------------------------------------------- -->
 <appendix title="Security Architecture and Considerations">
     
     Due to the expense and hassle imposed by the commercial PKI code
 <appendix title="Security Architecture and Considerations">
     
     Due to the expense and hassle imposed by the commercial PKI code
     Ibex's security architecture is divided into defenses against four
     major classes of attacks:
     
     Ibex's security architecture is divided into defenses against four
     major classes of attacks:
     
-  <section title="Malicious UI attempts to acquire or alter data on the client">
+  <heading title="Malicious UI attempts to acquire or alter data on the client"/>
     
     Ibex user interfaces are run in an extremely restrictive sandbox. The
     environment does not provide primitives for accessing any data outside
     
     Ibex user interfaces are run in an extremely restrictive sandbox. The
     environment does not provide primitives for accessing any data outside
     specifically indicates that that information should be made available
     to the Ibex application.
     
     specifically indicates that that information should be made available
     to the Ibex application.
     
-    </section>
-
-  <section title="Malicious UI attempts to use client to circumvent firewalls">
+  <heading title="Malicious UI attempts to use client to circumvent firewalls"/>
     
     Ibex user interfaces may only make XML-RPC or SOAP calls and load .ibex
     archives via HTTP; they cannot execute arbitrary HTTP GET's or open
     
     Ibex user interfaces may only make XML-RPC or SOAP calls and load .ibex
     archives via HTTP; they cannot execute arbitrary HTTP GET's or open
     such machines public IP addresses is a poor network security policy,
     and doing so squanders scarce public IPv4 addresses. As such, the onus
     is on the administrators of such machines to explicitly block access
     such machines public IP addresses is a poor network security policy,
     and doing so squanders scarce public IPv4 addresses. As such, the onus
     is on the administrators of such machines to explicitly block access
-    to clients reporting a <tt>User-Agent:</tt> header beginning with the
-    three characters "<tt>Ibex</tt>".
+    to clients reporting a <t>User-Agent:</t> header beginning with the
+    three characters "<t>Ibex</t>".
     
     
-    </section>
-
-  <section title="Malicious UI attempts to trick user into divulging secret information">
+  <heading title="Malicious UI attempts to trick user into divulging secret information"/>
     
     All top-level windows created by Ibex are <i>scarred</i> -- a stripe
     and a lock is drawn across the corner of the window. There is no way
     for a user interface to remove this scar. Ibex user interfaces may not
     create windows smaller than the size of the scar.
     
     
     All top-level windows created by Ibex are <i>scarred</i> -- a stripe
     and a lock is drawn across the corner of the window. There is no way
     for a user interface to remove this scar. Ibex user interfaces may not
     create windows smaller than the size of the scar.
     
-    </section>
-
-  <section title="Malicious network attempts to snoop or man-in-the-middle transactions">
+  <heading title="Malicious network attempts to snoop or man-in-the-middle transactions"/>
     
     Ibex user interfaces may transmit network data using HTTPS (SSL 3.0)
     for encryption. Ibex will attempt 128-bit encryption, but will
     
     Ibex user interfaces may transmit network data using HTTPS (SSL 3.0)
     for encryption. Ibex will attempt 128-bit encryption, but will
     connection with any data you would not normally trust an SSL-enabled
     web browser with.
     
     connection with any data you would not normally trust an SSL-enabled
     web browser with.
     
-    </section>
-
-  </appendix>
+</appendix>
 
 <!-- ----------------------------------------------------------------------- -->
 <appendix title="ECMAscript compliance">
 
 <!-- ----------------------------------------------------------------------- -->
 <appendix title="ECMAscript compliance">
     
     <list type="unordered">
 
     
     <list type="unordered">
 
-        The <tt>undefined</tt> value, <tt>===</tt>, and <tt>!==</tt>
+        The <t>undefined</t> value, <t>===</t>, and <t>!==</t>
         
         
-        The <tt>new</tt> keyword (and ECMAScript object inheritance)
-        <tt>eval</tt>
+        The <t>new</t> keyword (and ECMAScript object inheritance)
+        <t>eval</t>
         
         
-        <tt>getter</tt> and <tt>setter</tt>
+        <t>getter</t> and <t>setter</t>
         
         
-        The ECMA <tt>this</tt> keyword.
+        The ECMA <t>this</t> keyword.
         
         
-        The <tt>String</tt>, <tt>Number</tt>, and <tt>Boolean</tt>
-        classes.  Note that <tt>string</tt>, <tt>number</tt>, and
-        <tt>boolean</tt> values are supported, however.
+        The <t>String</t>, <t>Number</t>, and <t>Boolean</t>
+        classes.  Note that <t>string</t>, <t>number</t>, and
+        <t>boolean</t> values are supported, however.
         
         
-        You may not <tt>throw</tt> the <tt>null</tt> value.
+        You may not <t>throw</t> the <t>null</t> value.
 
     </list>
     
     Additionally, you must declare all root-scope variables (with
 
     </list>
     
     Additionally, you must declare all root-scope variables (with
-    <tt>var</tt>) before using them; failure to do so will result in an
+    <t>var</t>) before using them; failure to do so will result in an
     exception.  Box properties are pre-defined in the scope that scripts
     are executed in.
     
     </section>
 
     exception.  Box properties are pre-defined in the scope that scripts
     are executed in.
     
     </section>
 
-  </appendix>
-
   <section title="Extensions">
     
     <list type="unordered">
     
   <section title="Extensions">
     
     <list type="unordered">
     
-        The token <tt>..</tt> is equivalent to <tt>[""]</tt>.
+        The token <t>..</t> is equivalent to <t>[""]</t>.
     
         Trapping
     
         Cloning
     
     
         Trapping
     
         Cloning
     
-        Extended <tt>catch</tt> syntax.  The following code:
+        Extended <t>catch</t> syntax.  The following code:
         <pre>
         <pre>
-            } catch(e propname "foo.bar.baz") {
-               // ...
-            }
+        } catch(e propname "foo.bar.baz") {
+           // ...
+        }
         </pre>
         Is equivalent to:
         <pre>
         } catch(e) {
         </pre>
         Is equivalent to:
         <pre>
         } catch(e) {
-           if (e.propname != null &amp;&amp; e.propname >= "foo.bar.baz" &amp;&amp; e.propname &lt; "foo.bar.baz/") {
+           if (e.propname != null and e.propname >= "foo.bar.baz" and
+               "foo.bar.baz/" > e.propname) {
                // ...
            }
         }
                // ...
            }
         }
         if it does appear, it must be the last one.
     
         Since Ibex ECMAscripts are wrapped in XML, the lexical token
         if it does appear, it must be the last one.
     
         Since Ibex ECMAscripts are wrapped in XML, the lexical token
-        "<tt>lt</tt>" is be interpreted as <tt>&lt;</tt>, the lexical
-        token "<tt>gt</tt>" is be interpreted as <tt>&gt;</tt>, and the
-        token "<tt>and</tt>" is interpreted as <tt>&amp;&amp;</tt>.
+        "<t>lt</t>" is be interpreted as <t>&lt;</t>, the lexical
+        token "<t>gt</t>" is be interpreted as <t>&gt;</t>, and the
+        token "<t>and</t>" is interpreted as <t>&amp;&amp;</t>.
         Thus these tokens cannot be used as variable names.
     
         Thus these tokens cannot be used as variable names.
     
-        The identifier <tt>static</tt> is a reserved word in
+        The identifier <t>static</t> is a reserved word in
         ECMAScript, but not in Ibex.
     
         ECMAScript, but not in Ibex.
     
-        Ibex defines an additional reserved word, "<tt>assert</tt>",
+        Ibex defines an additional reserved word, "<t>assert</t>",
         which will evaluate the expression which follows it, throwing
         which will evaluate the expression which follows it, throwing
-        a <tt>ibex.assertion.failed</tt> exception if the expression
-        evaluates to <tt>false</tt>.
+        a <t>ibex.assertion.failed</t> exception if the expression
+        evaluates to <t>false</t>.
     
         To ensure that Ibex files appear the same in all text editors, tab
         characters are not allowed in Ibex files.
     
         To ensure that Ibex files appear the same in all text editors, tab
         characters are not allowed in Ibex files.
 
     </list>
     </section>
 
     </list>
     </section>
+</appendix>
 
 <!-- ----------------------------------------------------------------------- -->
 <appendix title="Logging and Command Line Invocation">
 
 <!-- ----------------------------------------------------------------------- -->
 <appendix title="Logging and Command Line Invocation">
     Very early in the loading process, Ibex begins logging messages about
     what it is doing.  Where this output is logged to differs by platform;
     currently it goes to standard output when running inside a JVM, and to
     Very early in the loading process, Ibex begins logging messages about
     what it is doing.  Where this output is logged to differs by platform;
     currently it goes to standard output when running inside a JVM, and to
-    <tt>$TMPDIR\ibex-log.txt</tt> on Win32 (where <tt>$TMPDIR</tt> is the
-    value returned by <tt>GetTempPath()</tt>). The logs contain a lot of
+    <t>$TMPDIR\ibex-log.txt</t> on Win32 (where <t>$TMPDIR</t> is the
+    value returned by <t>GetTempPath()</t>). The logs contain a lot of
     valuable debugging information and performance hints; if you are
     having trouble developing an Ibex application, be sure to check the
     logs.
     valuable debugging information and performance hints; if you are
     having trouble developing an Ibex application, be sure to check the
     logs.
     You can invoke Ibex directly from the command line during
     development. When using a JVM, the invocation format is:
     
     You can invoke Ibex directly from the command line during
     development. When using a JVM, the invocation format is:
     
-    <pre>
-      java -jar <i>path-to-ibex-jar</i> [-sv] <i>source-location</i> [<i>initial-template</i>]
+    <pre>    
+  java -jar path-to-ibex-jar [-sv] source-location [initial-template]
     </pre>
     
     </pre>
     
-    Where <tt><i>path-to-ibex-jar</i></tt> is the path to <tt>ibex.jar</tt>,
+    Where <t><i>path-to-ibex-jar</i></t> is the path to <t>ibex.jar</t>,
     which can be downloaded <link url="http://www.ibex.org/dist/ibex.jar" text="here"/>.
     
     On Win32, the invocation format is:
     
     <pre>
     which can be downloaded <link url="http://www.ibex.org/dist/ibex.jar" text="here"/>.
     
     On Win32, the invocation format is:
     
     <pre>
-      ibex.exe [-v] <i>source-location</i> [<i>initial-template</i>]
+    ibex.exe [-v] source-location [initial-template]
     </pre>
     
     </pre>
     
-    The file <tt>ibex.exe</tt> is placed in Windows' ActiveX cache
+    The file <t>ibex.exe</t> is placed in Windows' ActiveX cache
     directory the first time Ibex is used on the machine. The ActiveX
     cache location depends on what version of Windows you are using;
     directory the first time Ibex is used on the machine. The ActiveX
     cache location depends on what version of Windows you are using;
-    on newer versions of Windows it is <tt>C:\WINDOWS\DOWNLOADED
-    PROGRAM FILES\</tt>. You can also extract <tt>ibex.exe</tt> from
-    <tt>ibex.cab</tt>, which is available <link
+    on newer versions of Windows it is <t>C:\WINDOWS\DOWNLOADED
+    PROGRAM FILES\</t>. You can also extract <t>ibex.exe</t> from
+    <t>ibex.cab</t>, which is available <link
     url="http://www.ibex.org/dist/ibex.cab" text="here"/>.
     
     url="http://www.ibex.org/dist/ibex.cab" text="here"/>.
     
-    The <tt><i>source-location</i></tt> parameter can be either the path
+    The <t><i>source-location</i></t> parameter can be either the path
     to an .ibex archive, the http url of an .ibex archive, or the path to a
     directory comprising an unpacked .ibex archive.
     
     to an .ibex archive, the http url of an .ibex archive, or the path to a
     directory comprising an unpacked .ibex archive.
     
-    The <tt><i>initial-template</i></tt> parameter is the stream name of
+    The <t><i>initial-template</i></t> parameter is the stream name of
     a template to be used as the initial template. If ommitted, it
     a template to be used as the initial template. If ommitted, it
-    defaults to <tt>main</tt>.
+    defaults to <t>main</t>.
     
     
-    The <tt>-v</tt> option causes Ibex to enable verbose logging; this will
+    The <t>-v</t> option causes Ibex to enable verbose logging; this will
     cause it to log <i>lots</i> of information to the log file. This
     option will also substantially decrease Ibex's performance.
     
     cause it to log <i>lots</i> of information to the log file. This
     option will also substantially decrease Ibex's performance.
     
     Grammars are defined with a statement in the following form:
     
     <pre>
     Grammars are defined with a statement in the following form:
     
     <pre>
-       a ::= b { c }
+    a ::= b { c }
     </pre>
     A grammar is really just another function; once defined you can't tell
     it apart from an ordinary function.  A grammar takes one argument,
     </pre>
     A grammar is really just another function; once defined you can't tell
     it apart from an ordinary function.  A grammar takes one argument,
     result of executing the code block 'c' is returned.
     
     The property 'a' is read; if the value is a grammar, a new production
     result of executing the code block 'c' is returned.
     
     The property 'a' is read; if the value is a grammar, a new production
-    rule (ie a new alternative, as with '<tt>|</tt>') is added to that grammar
+    rule (ie a new alternative, as with '<t>|</t>') is added to that grammar
     (this is a destructive update).  This allows you to add productions to
     pre-existing grammars (for example, adding a new type of expression to
     a programming language by extending the 'expr' grammar).  If the old
     (this is a destructive update).  This allows you to add productions to
     pre-existing grammars (for example, adding a new type of expression to
     a programming language by extending the 'expr' grammar).  If the old
     <list type="unordered">
         string literals
          
     <list type="unordered">
         string literals
          
-        grouping parens <tt>()</tt>
+        grouping parens <t>()</t>
          
          
-        combinators:   <tt> | + * ?</tt>
+        combinators:   <t> | + * ?</t>
          
         references to other grammars
     </list>
          
         references to other grammars
     </list>
          
        The identifier 'whole' is bound to the string matched by the
        entire expression.  If the code block is omitted it behaves
          
        The identifier 'whole' is bound to the string matched by the
        entire expression.  If the code block is omitted it behaves
-       as if it were "<tt>{ return whole; }</tt>".
+       as if it were "<t>{ return whole; }</t>".
          
        For every reference to another grammar which was matched in the
        pattern, the *name used to reference that other grammar* will
          
        For every reference to another grammar which was matched in the
        pattern, the *name used to reference that other grammar* will