[Zope-Checkins] CVS: Zope/lib/python/StructuredText/regressions - Acquisition.ref:1.4 ExtensionClass.ref:1.4 MultiMapping.ref:1.4 examples.ref:1.4 index.ref:1.3

Andreas Jung andreas@zope.com
Mon, 8 Oct 2001 09:59:00 -0400


Update of /cvs-repository/Zope/lib/python/StructuredText/regressions
In directory cvs.zope.org:/tmp/cvs-serv8735/regressions

Modified Files:
	Acquisition.ref ExtensionClass.ref MultiMapping.ref 
	examples.ref index.ref 
Log Message:
updated HTML reference files to STXNG


=== Zope/lib/python/StructuredText/regressions/Acquisition.ref 1.3 => 1.4 ===
+<head>
+<title>Acquisition</title>
+</head>
+<body>
 <h1>Acquisition</h1>
 <p>  <a href="COPYRIGHT.html">Copyright (C) 1996-1998, Digital Creations</a>.</p>
-
 <p>  Acquisition <a href="#1">[1]</a> is a mechanism that allows objects to obtain
   attributes from their environment.  It is similar to inheritence,
   except that, rather than traversing an inheritence hierarchy
   to obtain attributes, a containment hierarchy is traversed.</p>
-
 <p>  The <a href="ExtensionClass.html">ExtensionClass</a>. release includes mix-in
   extension base classes that can be used to add acquisition as a
   feature to extension subclasses.  These mix-in classes use the
   context-wrapping feature of ExtensionClasses to implement
-  acquisition. Consider the following example:</p>
-<PRE>
+  acquisition. Consider the following example:
+<pre>
     import ExtensionClass, Acquisition
 
     class C(ExtensionClass.Base):
@@ -35,17 +38,15 @@
     d.a.report() # prints 'green'
 
     a.report() # raises an attribute error
-
-</PRE>
-
+</pre>
+</p>
 <p>  The class <code>A</code> inherits acquisition behavior from
   <code>Acquisition.Implicit</code>.  The object, <code>a</code>, "has" the color of
   objects <code>c</code> and <code>d</code> when it is accessed through them, but it
   has no color by itself.  The object <code>a</code> obtains attributes
   from it's environment, where it's environment is defined by
   the access path used to reach <code>a</code>.</p>
-
-<h2>Acquisition wrappers</h2>
+<h2>  Acquisition wrappers</h2>
 <p>    When an object that supports acquisition is accessed through
     an extension class instance, a special object, called an
     acquisition wrapper, is returned.  In the example above, the
@@ -53,133 +54,105 @@
     contains references to both <code>c</code> and <code>a</code>.  It is this wrapper
     that performs attribute lookup in <code>c</code> when an attribute
     cannot be found in <code>a</code>.</p>
-
 <p>    Aquisition wrappers provide access to the wrapped objects
-    through the attributes <code>aq_parent</code>, <code>aq_self</code>, <code>aq_base</code>.  
-    In the example above, the expressions:</p>
-<PRE>
+    through the attributes 'aq<u>parent', 'aq</u>self', <code>aq_base</code>.  
+    In the example above, the expressions:
+<pre>
        'c.a.aq_parent is c'
-
-</PRE>
-
-<p>    and:</p>
-<PRE>
+</pre>
+</p>
+<p>    and:
+<pre>
        'c.a.aq_self is a'
-
-</PRE>
-
-<p>    both evaluate to true, but the expression:</p>
-<PRE>
+</pre>
+</p>
+<p>    both evaluate to true, but the expression:
+<pre>
        'c.a is a'
-
-</PRE>
-
+</pre>
+</p>
 <p>    evaluates to false, because the expression <code>c.a</code> evaluates
     to an acquisition wrapper around <code>c</code> and <code>a</code>, not <code>a</code> itself.</p>
-
-<p>    The attribute <code>aq_base</code> is similar to <code>aq_self</code>.  Wrappers may be
-    nested and <code>aq_self</code> may be a wrapped object.  The <code>aq_base</code>
+<p>    The attribute 'aq<u>base' is similar to 'aq</u>self'.  Wrappers may be
+    nested and 'aq<u>self' may be a wrapped object.  The 'aq</u>base'
     attribute is the underlying object with all wrappers removed.</p>
-
-
-<h2>Acquisition Control</h2>
+<h2>  Acquisition Control</h2>
 <p>    Two styles of acquisition are supported in the current
     ExtensionClass release, implicit and explicit aquisition.</p>
-
-<h3>Implicit acquisition</h3>
+<h3>    Implicit acquisition</h3>
 <p>      Implicit acquisition is so named because it searches for
       attributes from the environment automatically whenever an
       attribute cannot be obtained directly from an object or
       through inheritence.</p>
-
 <p>      An attribute may be implicitly acquired if it's name does
       not begin with an underscore, <code>_</code>.</p>
-
 <p>      To support implicit acquisition, an object should inherit
       from the mix-in class <code>Acquisition.Implicit</code>.</p>
-
-
-<h3>Explicit Acquisition</h3>
+<h3>    Explicit Acquisition</h3>
 <p>      When explicit acquisition is used, attributes are not
       automatically obtained from the environment.  Instead, the
-      method <code>aq_aquire</code> must be used, as in:</p>
-<PRE>
+      method <code>aq_aquire</code> must be used, as in:
+<pre>
         print c.a.aq_acquire('color')
-
-</PRE>
-
+</pre>
+</p>
 <p>      To support explicit acquisition, an object should inherit
       from the mix-in class <code>Acquisition.Explicit</code>.</p>
-
-
-<h3>Controlled Acquisition</h3>
+<h3>    Controlled Acquisition</h3>
 <p>      A class (or instance) can provide attribute by attribute control
       over acquisition.  This is done by:</p>
 
-<ul><li><p>subclassing from <code>Acquisition.Explicit</code>, and</p>
-
-
+<ul>
+<li><p>subclassing from <code>Acquisition.Explicit</code>, and</p></li>
 <li><p>setting all attributes that should be acquired to the special
         value: <code>Acquisition.Acquired</code>.  Setting an attribute to this
         value also allows inherited attributes to be overridden with
-        acquired ones.</p>
-<p>        For example, in:</p>
-<PRE>
+        acquired ones.<p>        For example, in:
+<pre>
           class C(Acquisition.Explicit):
              id=1
              secret=2
              color=Acquisition.Acquired
              __roles__=Acquisition.Acquired
-
-</PRE>
-
+</pre>
+</p>
 <p>        The <em>only</em> attributes that are automatically acquired from
-        containing objects are <code>color</code>, and <code>__roles__</code>.  Note also
-        that the <code>__roles__</code> attribute is acquired even though it's
+        containing objects are <code>color</code>, and '_<u>roles</u><u><code>.  Note also
+        that the </code></u><u>roles</u>_' attribute is acquired even though it's
         name begins with an underscore.  In fact, the special
         <code>Acquisition.Acquired</code> value can be used in
         <code>Acquisition.Implicit</code> objects to implicitly acquire selected
         objects that smell like private objects.</p>
-
+</p></li>
 
 </ul>
-
-<h3>Filtered Acquisition</h3>
+<h3>    Filtered Acquisition</h3>
 <p>      The acquisition method, <code>aq_acquire</code>, accepts two optional
       arguments. The first of the additional arguments is a
       "filtering" function that is used when considering whether to
       acquire an object.  The second of the additional arguments is an
       object that is passed as extra data when calling the filtering
       function and which defaults to <code>None</code>.</p>
-
 <p>      The filter function is called with five arguments:</p>
 
-<ul><li><p>The object that the <code>aq_acquire</code> method was called on,</p>
-
-
-<li><p>The object where an object was found,</p>
-
-
-<li><p>The name of the object, as passed to <code>aq_acquire</code>,</p>
-
-
-<li><p>The object found, and</p>
-
-
-<li><p>The extra data passed to <code>aq_acquire</code>.</p>
+<ul>
+<li><p>The object that the <code>aq_acquire</code> method was called on,</p></li>
+<li><p>The object where an object was found,</p></li>
+<li><p>The name of the object, as passed to <code>aq_acquire</code>,</p></li>
+<li><p>The object found, and</p></li>
+<li><p>The extra data passed to <code>aq_acquire</code>.</p></li>
 
 </ul>
 <p>      If the filter returns a true object that the object found is
       returned, otherwise, the acquisition search continues.</p>
-
-<p>      For example, in:</p>
-<PRE>
+<p>      For example, in:
+<pre>
         from Acquisition import Explicit
 
         class HandyForTesting:
             def __init__(self, name): self.name=name
             def __str__(self):
-                return &quot;%s(%s)&quot; % (self.name, self.__class__.__name__)
+                return "%s(%s)" % (self.name, self.__class__.__name__)
             __repr__=__str__
 
         class E(Explicit, HandyForTesting): pass
@@ -200,21 +173,17 @@
             return hasattr(object,'isNice') and object.isNice
 
         print a.b.c.aq_acquire('p', find_nice)
-
-</PRE>
-
+</pre>
+</p>
 <p>      The filtered acquisition in the last line skips over the first
       attribute it finds with the name <code>p</code>, because the attribute
       doesn't satisfy the condition given in the filter. The output of
-      the last line is:</p>
-<PRE>
+      the last line is:
+<pre>
         spam(Nice) and I am nice!
-
-</PRE>
-
-
-
-<h2>Acquisition and methods</h2>
+</pre>
+</p>
+<h2>  Acquisition and methods</h2>
 <p>    Python methods of objects that support acquisition can use
     acquired attributes as in the <code>report</code> method of the first example
     above.  When a Python method is called on an object that is
@@ -222,89 +191,71 @@
     method as the first argument.  This rule also applies to
     user-defined method types and to C methods defined in pure mix-in
     classes.</p>
-
 <p>    Unfortunately, C methods defined in extension base classes that
     define their own data structures, cannot use aquired attributes at
     this time.  This is because wrapper objects do not conform to the
     data structures expected by these methods.</p>
-
-
-<h2>Acquiring Acquiring objects</h2>
-<p>    Consider the following example:</p>
-<PRE>
+<h2>  Acquiring Acquiring objects</h2>
+<p>    Consider the following example:
+<pre>
       from Acquisition import Implicit
 
       class C(Implicit):
           def __init__(self, name): self.name=name
           def __str__(self):
-              return &quot;%s(%s)&quot; % (self.name, self.__class__.__name__)
+              return "%s(%s)" % (self.name, self.__class__.__name__)
           __repr__=__str__
 
-      a=C(&quot;a&quot;)
-      a.b=C(&quot;b&quot;)
-      a.b.pref=&quot;spam&quot;
-      a.b.c=C(&quot;c&quot;)
-      a.b.c.color=&quot;red&quot;
-      a.b.c.pref=&quot;eggs&quot;
-      a.x=C(&quot;x&quot;)
+      a=C("a")
+      a.b=C("b")
+      a.b.pref="spam"
+      a.b.c=C("c")
+      a.b.c.color="red"
+      a.b.c.pref="eggs"
+      a.x=C("x")
 
       o=a.b.c.x
-
-</PRE>
-
+</pre>
+</p>
 <p>    The expression <code>o.color</code> might be expected to return <code>"red"</code>. In
     earlier versions of ExtensionClass, however, this expression
     failed.  Acquired acquiring objects did not acquire from the
     environment they were accessed in, because objects were only
     wrapped when they were first found, and were not rewrapped as they
     were passed down the acquisition tree.</p>
-
 <p>    In the current release of ExtensionClass, the expression "o.color"
     does indeed return <code>"red"</code>.</p>
-
 <p>    When searching for an attribute in <code>o</code>, objects are searched in
     the order <code>x</code>, <code>a</code>, <code>b</code>, <code>c</code>. So, for example, the expression,
     <code>o.pref</code> returns <code>"spam"</code>, not <code>"eggs"</code>.  In earlier releases of
     ExtensionClass, the attempt to get the <code>pref</code> attribute from <code>o</code>
     would have failed.</p>
-
 <p>    If desired, the current rules for looking up attributes in complex
     expressions can best be understood through repeated application of
-    the <code>__of__</code> method:</p>
-
-<dl><dt>    <code>a.x</code><dd><p><code>x.__of__(a)</code></p>
-
-
-<dt>    <code>a.b</code><dd><p><code>b.__of__(a)</code></p>
-
-
-<dt>    <code>a.b.x</code><dd><p><code>x.__of__(a).__of__(b.__of__(a))</code></p>
-
-
-<dt>    <code>a.b.c</code><dd><p><code>c.__of__(b.__of__(a))</code></p>
-
-
-<dt>    <code>a.b.c.x</code><dd><p><code>x.__of__(a).__of__(b.__of__(a)).__of__(c.__of__(b.__of__(a)))</code></p>
-
+    the '_<u>of</u>_' method:</p>
+<dl>
+<dt>    <code>a.x</code></dt>
+<dd>'x._<u>of</u>_(a)'</dd>
+<dt>    <code>a.b</code></dt>
+<dd>'b._<u>of</u>_(a)'</dd>
+<dt>    <code>a.b.x</code></dt>
+<dd>'x._<u>of</u><u>(a).</u><u>of</u><u>(b.</u><u>of</u>_(a))'</dd>
+<dt>    <code>a.b.c</code></dt>
+<dd>'c._<u>of</u><u>(b.</u><u>of</u>_(a))'</dd>
+<dt>    <code>a.b.c.x</code></dt>
+<dd>'x._<u>of</u><u>(a).</u><u>of</u><u>(b.</u><u>of</u><u>(a)).</u><u>of</u><u>(c.</u><u>of</u><u>(b.</u><u>of</u>_(a)))'</dd>
 </dl>
 <p>    and by keeping in mind that attribute lookup in a wrapper
     is done by trying to lookup the attribute in the wrapped object
     first and then in the parent object.  In the expressions above
-    involving the <code>__of__</code> method, lookup proceeds from left to right.</p>
-
+    involving the '_<u>of</u>_' method, lookup proceeds from left to right.</p>
 <p>    Note that heuristics are used to avoid most of the repeated
     lookups. For example, in the expression: <code>a.b.c.x.foo</code>, the object
     <code>a</code> is searched no more than once, even though it is wrapped three
     times.</p>
-
-
-<p>  <a name="1">[1]</a> Gil, J., Lorenz, D., 
-   <a href="http://www.bell-labs.com/people/cope/oopsla/Oopsla96TechnicalProgramAbstracts.html#GilLorenz">Environmental Acquisition--A New Inheritance-Like Abstraction Mechanism</a> 
+<p>.. <a href="#1">[1]</a> Gil, J., Lorenz, D., 
+   <a href="http://www.bell-labs.com/people/cope/oopsla/Oopsla96TechnicalProgramAbstracts.html#GilLorenz">Environmental Acquisition--A New Inheritance-Like Abstraction Mechanism</a>, 
    OOPSLA '96 Proceedings, ACM SIG-PLAN, October, 1996</p>
-
-<p>
-<TABLE BORDER=1 CELLPADDING=2>
-</TABLE></p>
-
-
+</body>
+</html>
 


=== Zope/lib/python/StructuredText/regressions/ExtensionClass.ref 1.3 => 1.4 === (795/895 lines abridged)
+<head>
+<title>Extension Classes, Python Extension Types Become Classes</title>
+</head>
+<body>
 <h1>Extension Classes, Python Extension Types Become Classes</h1>
 <p>  Jim Fulton, Digital Creations, Inc.
   jim@digicool.com</p>
-
 <p>  <a href="COPYRIGHT.html">Copyright (C) 1996-1998, Digital Creations</a>.</p>
-
-<h2>Abstract</h2>
+<h2>  Abstract</h2>
 <p>    A lightweight mechanism has been developed for making Python
     extension types more class-like.  Classes can be developed in an
     extension language, such as C or C++, and these classes can be
     treated like other python classes:</p>
 
-<ul><li><p>They can be sub-classed in python,</p>
-
-
-<li><p>They provide access to method documentation strings, and</p>
-
-
-<li><p>They can be used to directly create new instances.</p>
+<ul>
+<li><p>They can be sub-classed in python,</p></li>
+<li><p>They provide access to method documentation strings, and</p></li>
+<li><p>They can be used to directly create new instances.</p></li>
 
 </ul>
 <p>    An example class shows how extension classes are implemented and how
     they differ from extension types.</p>
-
 <p>    Extension classes provide additional extensions to class and
     instance semantics, including:</p>
 
-<ul><li><p>A protocol for accessing subobjects "in the context of" their
+<ul>
+<li><p>A protocol for accessing subobjects "in the context of" their
       containers.  This is used to implement custom method types
-      and <a href="Acquisition.html">environmental acquisition</a>.</p>
-
-
+      and <a href="Acquisition.html">environmental acquisition</a>.</p></li>
 <li><p>A protocol for overriding method call semantics.  This is used
       to implement "synchonized" classes and could be used to
-      implement argument type checking.</p>
-
-
+      implement argument type checking.</p></li>

[-=- -=- -=- 795 lines omitted -=- -=- -=-]

-
-
+        classes,</p></li>
 <li><p>Extension classes to provide meta-data, such as unbound methods
-        and their documentation string.</p>
+        and their documentation string.</p></li>
 
 </ul>
-
+</p>
 <p>    In addition, the extension class module provides a relatively
     concise example of the use of mechanisms that were added to Python
     to support MESS <a href="#6">[6]</a>, and that were described at the fourth Python
     Workshop <a href="#4">[4]</a>.  It is hoped that this will spur research in improved
     and specialized models for class implementation in Python.</p>
-
-
 <p>  References</p>
-
-<p>  <a name="1">[1]</a> Fulton, J., <a href="http://www.digicool.com/papers/Persistence.html">Providing Persistence for World-Wide-Web Applications</a>
+<p>.. <a href="#1">[1]</a> Fulton, J., <a href="http://www.digicool.com/papers/Persistence.html">Providing Persistence for World-Wide-Web Applications</a>,
  Proceedings of the 5th Python Workshop.</p>
-
-<p>  <a name="2">[2]</a> Page, R. and Cropper, S., <a href="http://www.digicool.com/papers/DocumentTemplate.html">Document Template</a>
+<p>.. <a href="#2">[2]</a> Page, R. and Cropper, S., <a href="http://www.digicool.com/papers/DocumentTemplate.html">Document Template</a>,
  Proceedings of the 5th Python Workshop.</p>
-
-<p>  <a name="3">[3]</a> Beaudry, D., <a href="http://www.python.org/workshops/1994-11/BuiltInClasses/BuiltInClasses_1.html">Deriving Built-In Classes in Python</a>
+<p>.. <a href="#3">[3]</a> Beaudry, D., <a href="http://www.python.org/workshops/1994-11/BuiltInClasses/BuiltInClasses_1.html">Deriving Built-In Classes in Python</a>,
  Proceedings of the First International Python Workshop.</p>
-
-<p>  <a name="4">[4]</a> Van Rossum, G., <a href="http://www.python.org/workshops/1996-06/notes/thursday.html">Don Beaudry Hack - MESS</a>
+<p>.. <a href="#4">[4]</a> Van Rossum, G., <a href="http://www.python.org/workshops/1996-06/notes/thursday.html">Don Beaudry Hack - MESS</a>,
  presented in the Developer's Future Enhancements session of the 
  4th Python Workshop. </p>
-
-<p>  <a name="5">[5]</a> Fulton, J., <a href="http://www.digicool.com/jim/MetaType.c">Meta-Type Object</a>
+<p>.. <a href="#5">[5]</a> Fulton, J., <a href="http://www.digicool.com/jim/MetaType.c">Meta-Type Object</a>,
  This is a small proposal, the text of which is contained in a 
  sample implementation source file,  </p>
-
-<p>  <a name="6">[6]</a> Beaudry, D., and Ascher, D., "The Meta-Extension Set", 
- http://starship.skyport.net/~da/mess/.
-</p>
-
-
+<p>.. <a href="#6">[6]</a> Beaudry, D., and Ascher, D., <a href="http://starship.skyport.net/~da/mess/">The Meta-Extension Set</a>.</p>
+</body>
+</html>
 


=== Zope/lib/python/StructuredText/regressions/MultiMapping.ref 1.3 => 1.4 ===
+<head>
+<title>Example: MultiMapping objects</title>
+</head>
+<body>
 <h1>Example: MultiMapping objects</h1>
 <p>  <a href="COPYRIGHT.html">Copyright (C) 1996-1998, Digital Creations</a>.</p>
-
 <p>  As an example, consider an extension class that implements a
   "MultiMapping". A multi-mapping is an object that encapsulates 0
   or more mapping objects.  When an attempt is made to lookup an
   object, the encapsulated mapping objects are searched until an
   object is found.</p>
-
 <p>  Consider an implementation of a MultiMapping extension type,
-  without use of the extension class mechanism:</p>
-<PRE>
-    #include &quot;Python.h&quot;
+  without use of the extension class mechanism:
+<pre>
+    #include "Python.h"
 
     #define UNLESS(E) if(!(E))
 
@@ -24,7 +27,7 @@
     static PyObject *
     MM_push(MMobject *self, PyObject *args){
         PyObject *src;
-        UNLESS(PyArg_ParseTuple(args, &quot;O&quot;, &amp;src)) return NULL;
+        UNLESS(PyArg_ParseTuple(args, "O", &amp;src)) return NULL;
         UNLESS(-1 != PyList_Append(self-&gt;data,src)) return NULL;
         Py_INCREF(Py_None);
         return Py_None;
@@ -37,7 +40,7 @@
         static PyObject *emptyList=0;
 
         UNLESS(emptyList) UNLESS(emptyList=PyList_New(0)) return NULL;
-        UNLESS(PyArg_ParseTuple(args, &quot;&quot;)) return NULL;
+        UNLESS(PyArg_ParseTuple(args, "")) return NULL;
         UNLESS(-1 != (l=PyList_Size(self-&gt;data))) return NULL;
         l--;
         UNLESS(r=PySequence_GetItem(self-&gt;data,l)) return NULL;
@@ -49,10 +52,10 @@
     }
 
     static struct PyMethodDef MM_methods[] = {
-        {&quot;push&quot;, (PyCFunction) MM_push, 1,
-         &quot;push(mapping_object) -- Add a data source&quot;},
-        {&quot;pop&quot;,  (PyCFunction) MM_pop,  1,
-         &quot;pop() -- Remove and return the last data source added&quot;}, 
+        {"push", (PyCFunction) MM_push, 1,
+         "push(mapping_object) -- Add a data source"},
+        {"pop",  (PyCFunction) MM_pop,  1,
+         "pop() -- Remove and return the last data source added"}, 
         {NULL,              NULL}           /* sentinel */
     };
 
@@ -60,7 +63,7 @@
     newMMobject(PyObject *ignored, PyObject *args){
         MMobject *self;
 
-        UNLESS(PyArg_ParseTuple(args, &quot;&quot;)) return NULL;
+        UNLESS(PyArg_ParseTuple(args, "")) return NULL;
         UNLESS(self = PyObject_NEW(MMobject, &amp;MMtype)) return NULL;
         UNLESS(self-&gt;data=PyList_New(0)) goto err;
         return (PyObject *)self;
@@ -120,13 +123,13 @@
     /* -------------------------------------------------------- */
 
     static char MMtype__doc__[] = 
-    &quot;MultiMapping -- Combine multiple mapping objects for lookup&quot;
+    "MultiMapping -- Combine multiple mapping objects for lookup"
     ;
 
     static PyTypeObject MMtype = {
               PyObject_HEAD_INIT(&amp;PyType_Type)
               0,                            /*ob_size*/
-              &quot;MultMapping&quot;,                        /*tp_name*/
+              "MultMapping",                        /*tp_name*/
               sizeof(MMobject),             /*tp_basicsize*/
               0,                            /*tp_itemsize*/
               /* methods */
@@ -149,8 +152,8 @@
     };
 
     static struct PyMethodDef MultiMapping_methods[] = {
-        {&quot;MultiMapping&quot;, (PyCFunction)newMMobject, 1,
-         &quot;MultiMapping() -- Create a new empty multi-mapping&quot;},
+        {"MultiMapping", (PyCFunction)newMMobject, 1,
+         "MultiMapping() -- Create a new empty multi-mapping"},
         {NULL,              NULL}           /* sentinel */
     };
 
@@ -159,16 +162,15 @@
         PyObject *m;
 
         m = Py_InitModule4(
-            &quot;MultiMapping&quot;, MultiMapping_methods,
-              &quot;MultiMapping -- Wrap multiple mapping objects for lookup&quot;,
+            "MultiMapping", MultiMapping_methods,
+              "MultiMapping -- Wrap multiple mapping objects for lookup",
               (PyObject*)NULL,PYTHON_API_VERSION);
 
         if (PyErr_Occurred()) 
-           Py_FatalError(&quot;can't initialize module MultiMapping&quot;);
+           Py_FatalError("can't initialize module MultiMapping");
     }
-
-</PRE>
-
+</pre>
+</p>
 <p>  This module defines an extension type, <code>MultiMapping</code>, and exports a
   module function, <code>MultiMapping</code>, that creates <code>MultiMapping</code>
   Instances. The type provides two methods, <code>push</code>, and <code>pop</code>, for
@@ -176,12 +178,11 @@
   The type provides mapping behavior, implementing mapping length
   and subscript operators but not mapping a subscript assignment
   operator.</p>
-
 <p>  Now consider an extension class implementation of MultiMapping
-  objects:</p>
-<PRE>
-    #include &quot;Python.h&quot;
-    #include &quot;ExtensionClass.h&quot;
+  objects:
+<pre>
+    #include "Python.h"
+    #include "ExtensionClass.h"
 
     #define UNLESS(E) if(!(E))
 
@@ -198,7 +199,7 @@
               PyObject *args;
     {
         PyObject *src;
-        UNLESS(PyArg_ParseTuple(args, &quot;O&quot;, &amp;src)) return NULL;
+        UNLESS(PyArg_ParseTuple(args, "O", &amp;src)) return NULL;
         UNLESS(-1 != PyList_Append(self-&gt;data,src)) return NULL;
         Py_INCREF(Py_None);
         return Py_None;
@@ -214,7 +215,7 @@
         static PyObject *emptyList=0;
 
         UNLESS(emptyList) UNLESS(emptyList=PyList_New(0)) return NULL;
-        UNLESS(PyArg_ParseTuple(args, &quot;&quot;)) return NULL;
+        UNLESS(PyArg_ParseTuple(args, "")) return NULL;
         UNLESS(-1 != (l=PyList_Size(self-&gt;data))) return NULL;
         l--;
         UNLESS(r=PySequence_GetItem(self-&gt;data,l)) return NULL;
@@ -230,7 +231,7 @@
            MMobject *self;
            PyObject *args;
     {
-        UNLESS(PyArg_ParseTuple(args, &quot;&quot;)) return NULL;
+        UNLESS(PyArg_ParseTuple(args, "")) return NULL;
         UNLESS(self-&gt;data=PyList_New(0)) goto err;
         Py_INCREF(Py_None);
         return Py_None;
@@ -240,12 +241,12 @@
     }
 
     static struct PyMethodDef MM_methods[] = {
-        {&quot;__init__&quot;, (PyCFunction)MM__init__, 1,
-         &quot;__init__() -- Create a new empty multi-mapping&quot;},
-        {&quot;push&quot;, (PyCFunction) MM_push, 1,
-         &quot;push(mapping_object) -- Add a data source&quot;},
-        {&quot;pop&quot;,  (PyCFunction) MM_pop,  1,
-         &quot;pop() -- Remove and return the last data source added&quot;}, 
+        {"__init__", (PyCFunction)MM__init__, 1,
+         "__init__() -- Create a new empty multi-mapping"},
+        {"push", (PyCFunction) MM_push, 1,
+         "push(mapping_object) -- Add a data source"},
+        {"pop",  (PyCFunction) MM_pop,  1,
+         "pop() -- Remove and return the last data source added"}, 
         {NULL,              NULL}           /* sentinel */
     };
 
@@ -310,13 +311,13 @@
     /* -------------------------------------------------------- */
 
     static char MMtype__doc__[] = 
-    &quot;MultiMapping -- Combine multiple mapping objects for lookup&quot;
+    "MultiMapping -- Combine multiple mapping objects for lookup"
     ;
 
     static PyExtensionClass MMtype = {
               PyObject_HEAD_INIT(&amp;PyType_Type)
               0,                            /*ob_size*/
-              &quot;MultMapping&quot;,                        /*tp_name*/
+              "MultMapping",                        /*tp_name*/
               sizeof(MMobject),             /*tp_basicsize*/
               0,                            /*tp_itemsize*/
               /* methods */
@@ -349,37 +350,34 @@
         PyObject *m, *d;
 
         m = Py_InitModule4(
-            &quot;MultiMapping&quot;, MultiMapping_methods,
-            &quot;MultiMapping -- Wrap multiple mapping objects for lookup&quot;,
+            "MultiMapping", MultiMapping_methods,
+            "MultiMapping -- Wrap multiple mapping objects for lookup",
             (PyObject*)NULL,PYTHON_API_VERSION);
         d = PyModule_GetDict(m);
-        PyExtensionClass_Export(d,&quot;MultiMapping&quot;,MMtype);
+        PyExtensionClass_Export(d,"MultiMapping",MMtype);
 
         if (PyErr_Occurred()) 
-           Py_FatalError(&quot;can't initialize module MultiMapping&quot;);
+           Py_FatalError("can't initialize module MultiMapping");
     }
-
-</PRE>
-
+</pre>
+</p>
 <p>  This version includes <code>ExtensionClass.h</code>.  The two declarations of
   <code>MMtype</code> have been changed from <code>PyTypeObject</code> to <code>PyExtensionClass</code>.
-  The <code>METHOD_CHAIN</code> macro has been used to add methods to the end of
+  The 'METHOD<u>CHAIN' macro has been used to add methods to the end of
   the definition for <code>MMtype</code>.  The module function, newMMobject has
-  been replaced by the <code>MMtype</code> method, <code>MM__init__</code>.  Note that this
-  method does not create or return a new object.  Finally, the lines:</p>
-<PRE>
+  been replaced by the <code>MMtype</code> method, 'MM</u><u>init</u>_'.  Note that this
+  method does not create or return a new object.  Finally, the lines:
+<pre>
     d = PyModule_GetDict(m);
-    PyExtensionClass_Export(d,&quot;MultiMapping&quot;,MMtype);
-
-</PRE>
-
+    PyExtensionClass_Export(d,"MultiMapping",MMtype);
+</pre>
+</p>
 <p>  Have been added to both initialize the extension class and to export
   it in the module dictionary.</p>
-
 <p>  To use this module, compile, link, and import it as with any other
   extension module.  The following python code illustrates the
-  module's use:</p>
-<PRE>
+  module's use:
+<pre>
     from MultiMapping import MultiMapping
     m=MultiMapping()
     m.push({'spam':1, 'eggs':2})
@@ -388,16 +386,15 @@
     m['spam'] # returns 3
     m['ham']  # returns 4
     m['foo']  # raises a key error
-
-</PRE>
-
+</pre>
+</p>
 <p>  Creating the <code>MultiMapping</code> object took three steps, one to create
   an empty <code>MultiMapping</code>, and two to add mapping objects to it.  We
   might wish to simplify the process of creating MultiMapping
   objects by providing a constructor that takes source mapping
   objects as parameters.  We can do this by sub-classing MultiMapping
-  in Python:</p>
-<PRE>
+  in Python:
+<pre>
     from MultiMapping import MultiMapping
     class ExtendedMultiMapping(MultiMapping):
         def __init__(self,*data):
@@ -409,13 +406,11 @@
     m['spam'] # returns 3
     m['ham']  # returns 4
     m['foo']  # raises a key error
-
-</PRE>
-
+</pre>
+</p>
 <p>  Note that the source file included in the ExtensionClass
   distribution has numerous enhancements beyond the version shown in
-  this document.
-</p>
-
-
+  this document.</p>
+</body>
+</html>
 


=== Zope/lib/python/StructuredText/regressions/examples.ref 1.3 => 1.4 ===
+<head>
+<title>Small Trials for Structured Text Formatting</title>
+</head>
+<body>
 <h1>Small Trials for Structured Text Formatting</h1>
 <p>  This paragraph should be preceded by a level 1 header.  It should
   not, itself, be made into a header, just a regular paragraph.</p>
-
 <p>  Here are a few presentation styles, in a list <a href="#1">[1]</a>:</p>
 
-<ul><li><p>A word: <em>emphasized</em>.</p>
-
-
-<li><p>A word: <u>underlined</u>.</p>
-
-
-<li><p>A word <strong>strong</strong>.</p>
+<ul>
+<li><p>A word: <em>emphasized</em>.</p></li>
+<li><p>A word: <u>underlined</u>.</p></li>
+<li><p>A word <strong>strong</strong>.</p></li>
+<li><p>An inline example: <code>1+2</code>.</p></li>
+<li><p>Another example with a different format:
+    ``x='spam''' or ``y='spam''' or ``<dtml-var spam>'<code>.</code><p>    We can use expressions in the DTML var tag as 
+    in ``<dtml-var "x+'.txt'">''</p>
+</p></li>
+<li><p>A mult-line example:
+<pre>
+     blah
+
+     *foo bar*
+
+     &lt;dtml-var yeha&gt;
+</pre>
+</p></li>
 
 </ul>
-
-<p>  <a name="1">[1]</a> (The referring text should be a paragraph, not a header, and
-should contain a reference to this footnote, footnote "[1]".)</p>
-<p>  Some hrefs, in a definition list:</p>
-
-<dl><dt>  <u>Regular</u><dd><p><a href="http://www.zope.org">http://www.zope.org/</a></p>
-
-
-<dt>  <u>W/trailing punctuation</u><dd><p><a href="http://www.zope.org">http://www.zope.org/</a>.</p>
-
-
-<dt>  <u>W protocol implicit</u><dd><p><a href="locallink">locallink</a></p>
-
-
-<dt>  <u>W protocol implicit</u>, alternate<dd><p><a href="locallink">locallink</a></p>
-
+<p>.. <a href="#1">[1]</a> (The referring text should be a paragraph, not a header, and
+should contain a reference to this footnote, footnote "<a href="#1">[1]</a>".)<p>  Some hrefs, in a definition list:</p>
+<dl>
+<dt>  <u>Regular</u></dt>
+<dd><a href="http://www.zope.org">http://www.zope.org/</a></dd>
+<dt>  <u>W/trailing punctuation</u></dt>
+<dd><a href="http://www.zope.org">http://www.zope.org/</a>.</dd>
+<dt>  <u>W protocol implicit</u></dt>
+<dd><a href=":locallink">locallink</a></dd>
+<dt>  <u>W protocol implicit</u>, alternate</dt>
+<dd>"locallink", :locallink</dd>
 </dl>
-<p>
-<TABLE BORDER=1 CELLPADDING=2>
- <TR>
-  <TD ALIGN=CENTER COLSPAN=2> A Simple Two-column Table </TD>
- </TR>
- <TR>
-  <TD ALIGN=CENTER COLSPAN=1> Column A </TD>
-  <TD ALIGN=CENTER COLSPAN=1> Column B </TD>
- </TR>
- <TR>
-  <TD ALIGN=CENTER COLSPAN=1> Apples   </TD>
-  <TD ALIGN=CENTER COLSPAN=1> Oranges  </TD>
- </TR>
-</TABLE></p>
-
-<p>
-<TABLE BORDER=1 CELLPADDING=2>
-</TABLE></p>
-
-
+<p>  |||| A Simple Two-column Table ||
+  || Column A || Column B ||
+  || Apples   || Oranges  ||</p>
+</p>
+</body>
+</html>
 


=== Zope/lib/python/StructuredText/regressions/index.ref 1.2 => 1.3 ===
-Extension Class</p>
+<html>
+<head>
+<title>Extension Class</title>
+</head>
+<body>
+<h1>Extension Class</h1>
 <p>    <a href="COPYRIGHT.html">Copyright (C) 1996-1998, Digital Creations</a>.</p>
-
 <p>    A lightweight mechanism has been developed for making Python
     extension types more class-like.  Classes can be developed in an
     extension language, such as C or C++, and these classes can be
     treated like other python classes:</p>
 
-<ul><li><p>They can be sub-classed in python,</p>
-
-
-<li><p>They provide access to method documentation strings, and</p>
-
-
-<li><p>They can be used to directly create new instances.</p>
+<ul>
+<li><p>They can be sub-classed in python,</p></li>
+<li><p>They provide access to method documentation strings, and</p></li>
+<li><p>They can be used to directly create new instances.</p></li>
 
 </ul>
 <p>    Extension classes provide additional extensions to class and
     instance semantics, including:</p>
 
-<ul><li><p>A protocol for accessing subobjects "in the context of" their
+<ul>
+<li><p>A protocol for accessing subobjects "in the context of" their
       containers.  This is used to implement custom method types
-      and <a href="Acquisition.html">environmental acquisition</a>.</p>
-
-
+      and <a href="Acquisition.html">environmental acquisition</a>.</p></li>
 <li><p>A protocol for overriding method call semantics.  This is used
       to implement "synchonized" classes and could be used to
-      implement argument type checking.</p>
-
-
+      implement argument type checking.</p></li>
 <li><p>A protocol for class initialization that supports execution of a
-      special <code>__class_init__</code> method after a class has been
-      initialized.</p>
+      special '_<u>class</u>init__' method after a class has been
+      initialized. </p></li>
 
 </ul>
 <p>    Extension classes illustrate how the Python class mechanism can be
     extended and may provide a basis for improved or specialized class
     models. </p>
-
-<h1>Releases</h1>
-<p>    The current release is <a href="ExtensionClass-1.2.tar.gz">1.2</a>
+<h2>  Releases</h2>
+<p>    The current release is <a href="ExtensionClass-1.2.tar.gz">1.2</a>,
     To find out what's changed in this release,
     see the <a href="release.html">release notes</a>.</p>
-
 <p>    Documentation is available <a href="ExtensionClass.html">on-line</a>.</p>
-
-
-<h1>Windows Binaries</h1>
-<p>    A win32 binary release, <a href="ec12.zip">ec12.zip</a> is available.  This
+<h3>  Windows Binaries</h3>
+<p>    A win32 binary release, <a href="ec12.zip">ec12.zip</a>, is available.  This
     release includes all of the ExtensionClass modules built as 
     Windows extension modules (.pyd) files.  These were built for
     Python 1.5.1 using Microsoft Visual C++ 5.0 in "Release" mode.</p>
-
-
-<p>
-<TABLE BORDER=1 CELLPADDING=2>
-</TABLE></p>
-
-
+</body>
+</html>