[Checkins] SVN: zope2book/trunk/source/ Various small updates

Hanno Schlichting plone at hannosch.info
Tue Feb 17 14:17:54 EST 2009


Log message for revision 96647:
  Various small updates
  

Changed:
  U   zope2book/trunk/source/AdvDTML.rst
  U   zope2book/trunk/source/AppendixC.rst
  U   zope2book/trunk/source/DTML.rst
  U   zope2book/trunk/source/RelationalDatabases.rst
  U   zope2book/trunk/source/SearchingZCatalog.rst
  U   zope2book/trunk/source/Sessions.rst
  U   zope2book/trunk/source/VirtualHosting.rst
  U   zope2book/trunk/source/ZPT.rst

-=-
Modified: zope2book/trunk/source/AdvDTML.rst
===================================================================
--- zope2book/trunk/source/AdvDTML.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/AdvDTML.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -1291,230 +1291,6 @@
 needs.  This is explained more in the chapter entitled `Searching
 and Categorizing Content <SearchingZCatalog.html>`_.
 
-Exception Handling Tags
------------------------
-
-Zope has extensive exception handling facilities. You can get
-access to these facilities with the *raise* and *try* tags. For more
-information on exceptions and how they are raised and handled see
-a book on Python or you can read the online `Python
-Tutorial <http://docs.python.org/tutorial/errors.html>`_.
-
-The *Raise* Tag
-~~~~~~~~~~~~~~~
-
-You can raise exceptions with the *raise* tag. One reason to raise
-exceptions is to signal an error. For example you could check
-for a problem with the *if* tag, and in case there was something
-wrong you could report the error with the *raise* tag.
-
-The *raise* tag has a type attribute for specifying an error type.
-The error type is a short descriptive name for the error. In
-addition, there are some standard error types, like
-*Unauthorized* and *Redirect* that are returned as HTTP
-errors. *Unauthorized* errors cause a log-in prompt to be
-displayed on the user's browser. You can raise HTTP errors to
-make Zope send an HTTP error. For example::
-
-  <dtml-raise type="404">Not Found</dtml-raise>
-
-This raises an HTTP 404 (Not Found) error. Zope responds by
-sending the HTTP 404 error back to the client's browser.
-
-The *raise* tag is a block tag. The block enclosed by the
-*raise* tag is rendered to create an error message. If the
-rendered text contains any HTML markup, then Zope will display
-the text as an error message on the browser, otherwise a generic
-error message is displayed.
-
-Here is a *raise* tag example::
-
-  <dtml-if expr="balance >= debit_amount">
-
-    <dtml-call expr="debitAccount(account, debit_amount)">
-
-    <p><dtml-var debit_amount> has been deducted from your
-    account <dtml-var account>.</p>
-
-  <dtml-else>
-
-    <dtml-raise type="Insufficient funds">
-
-      <p>There is not enough money in account <dtml-account> 
-      to cover the requested debit amount.</p>
-
-    </dtml-raise>
-
-  </dtml-if>
-
-There is an important side effect to raising an exception,
-exceptions cause the current transaction to be rolled back. This
-means any changes made by a web request are ignored. So in
-addition to reporting errors, exceptions allow you to back out
-changes if a problem crops up.
-
-The *Try* Tag
-~~~~~~~~~~~~~
-
-If an exception is raised either manually with the *raise* tag, or
-as the result of some error that Zope encounters, you can catch
-it with the *try* tag.
-
-Exceptions are unexpected errors that Zope encounters during the
-execution of a DTML document or method. Once an exception is
-detected, the normal execution of the DTML stops. Consider the
-following example::
-
-  Cost per unit: <dtml-var
-                       expr="_.float(total_cost/total_units)" 
-                       fmt=dollars-and-cents>
-
-This DTML works fine if *total_units* is not zero. However, if
-*total_units* is zero, a *ZeroDivisionError* exception is raised
-indicating an illegal operation. So rather than rendering the
-DTML, an error message will be returned.
-
-You can use the *try* tag to handle these kind of problems. With
-the *try* tag you can anticipate and handle errors yourself,
-rather than getting a Zope error message whenever an exception
-occurs.
-
-The *try* tag has two functions. First, if an exception is raised,
-the *try* tag gains control of execution and handles the exception
-appropriately, and thus avoids returning a Zope error
-message. Second, the *try* tag allows the rendering of any
-subsequent DTML to continue.
-
-Within the *try* tag are one or more *except* tags that identify and
-handle different exceptions. When an exception is raised, each
-*except* tag is checked in turn to see if it matches the
-exception's type. The first *except* tag to match handles the
-exception. If no exceptions are given in an *except* tag, then the
-*except* tag will match all exceptions.
-
-Here's how to use the *try* tag to avoid errors that could occur
-in the last example::
-
-  <dtml-try>
-
-    Cost per unit: <dtml-var 
-                         expr="_.float(total_cost/total_units)"
-                         fmt="dollars-and-cents">
-
-  <dtml-except ZeroDivisionError> 
-
-    Cost per unit: N/A 
-
-  </dtml-try> 
-
-If a *ZeroDivisionError* is raised, control goes to the *except*
-tag, and "Cost per unit: N/A" is rendered. Once the except tag
-block finishes, execution of DTML continues after the *try* block.
-
-DTML's *except* tags work with Python's class-based
-exceptions. In addition to matching exceptions by name, the
-except tag will match any subclass of the named exception. For
-example, if *ArithmeticError* is named in a *except* tag, the
-tag can handle all *ArithmeticError* subclasses including,
-*ZeroDivisionError*. See a Python reference such as the online
-`Python Library Reference
-<http://docs.python.org/library/exceptions.html>`_
-for a list of Python exceptions and their subclasses.  An
-*except* tag can catch multiple exceptions by listing them all
-in the same tag.
-
-Inside the body of an *except* tag you can access information
-about the handled exception through several special
-variables.
-
-*error_type*
-    The type of the handled exception. 
-
-*error_value*
-    The value of the handled exception.
-
-*error_tb*
-    The traceback of the handled exception.
-
-You can use these variables to provide error messages to users
-or to take different actions such as sending email to the
-webmaster or logging errors depending on the type of error.
-
-The *Try* Tag Optional *Else* Block
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-The *try* tag has an optional *else* block that is rendered if an
-exception didn't occur.  Here's an example of how to use the
-*else* tag within the try tag::
-
-  <dtml-try> 
-
-    <dtml-call feedAlligators>
-
-  <dtml-except NotEnoughFood WrongKindOfFood>
-
-    <p>Make sure you have enough alligator food first.</p>
-
-  <dtml-except NotHungry> 
-
-    <p>The alligators aren't hungry yet.</p>
-
-  <dtml-except> 
-
-    <p>There was some problem trying to feed the alligators.<p>
-    <p>Error type: <dtml-var error_type></p>
-    <p>Error value: <dtml-var error_value></p>
-
-  <dtml-else> 
-
-    <p>The alligator were successfully fed.</p>
-
-  </dtml-try> 
-
-The first *except* block to match the type of error raised is
-rendered. If an *except* block has no name, then it matches all
-raised errors. The optional *else* block is rendered when no
-exception occurs in the *try* block. Exceptions in the *else*
-block are not handled by the preceding *except* blocks.
-
-The *Try* Tag Optional *Finally* Block
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-You can also use the *try* tag in a slightly different
-way. Instead of handling exceptions, the *try* tag can be used
-not to trap exceptions, but to clean up after them.
-
-The *finally* tag inside the *try* tag specifies a cleanup block
-to be rendered even when an exception occurs.
-
-The *finally* block is only useful if you need to clean up
-something that will not be cleaned up by the transaction abort
-code. The *finally* block will always be called, whether there
-is an exception or not and whether a *return* tag is used or
-not. If you use a *return* tag in the try block, any output of
-the *finally* block is discarded. Here's an example of how you
-might use the *finally* tag::
-
-  <dtml-call acquireLock>  
-  <dtml-try>
-      <dtml-call useLockedResource>
-  <dtml-finally>
-      <!-- this always gets done even if an exception is raised -->
-      <dtml-call releaseLock>
-  </dtml-try>
-
-In this example you first acquire a lock on a resource, then
-try to perform some action on the locked resource. If an
-exception is raised, you don't handle it, but you make sure to
-release the lock before passing control off to an exception
-handler. If all goes well and no exception is raised, you
-still release the lock at the end of the *try* block by
-executing the *finally* block.
-
-The *try/finally* form of the *try* tag is seldom used in
-Zope. This kind of complex programming control is often better
-done in Python or Perl.
-
 Other useful examples
 ---------------------
 

Modified: zope2book/trunk/source/AppendixC.rst
===================================================================
--- zope2book/trunk/source/AppendixC.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/AppendixC.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -842,7 +842,7 @@
 
   request/cookies/oatmeal
   nothing
-  context/some-file 2001_02.html.tar.gz/foo
+  context/some-file 2009_02.html.tar.gz/foo
   root/to/branch | default
   request/name | string:Anonymous Coward
   context/?tname/macros/?mname

Modified: zope2book/trunk/source/DTML.rst
===================================================================
--- zope2book/trunk/source/DTML.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/DTML.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -1,16 +1,15 @@
 Basic DTML
 ==========
 
-DTML (Document Template Markup Language) is a templating facility
-which supports the creation of dynamic HTML and text.  It is
-typically used in Zope to create dynamic web pages.  For example,
-you might use DTML to create a web page which "fills in" rows and
-cells of an HTML table contained within the page from data fetched
-out of a database.
+DTML (Document Template Markup Language) is a templating facility which
+supports the creation of dynamic HTML and text. In Zope it is most often used
+when you want to generate non-HTML or non-XML content, like parts of SQL
+queries, dynamic CSS and JavaScript files or email templates. Generating HTML
+and XML is usually done with page templates inside Zope.
 
 DTML is a *tag-based* presentation and scripting language.  This
-means that *tags* (e.g. '<dtml-var name>') embedded in your HTML
-cause parts of your page to be replaced with "computed" content.
+means that *tags* (e.g. '<dtml-var name>') embedded in your text
+cause parts of your text to be replaced with "computed" content.
 
 DTML is a "server-side" scripting language.  This means that DTML
 commands are executed by Zope at the server, and the result of that
@@ -26,9 +25,9 @@
 inasmuch as it will not allow you to create "inline" Python
 *statements* (if... then.. else..)  in the way that JSP, mod_perl
 or PHP will allow you to embed a block of their respective
-language's code into an HTML page. DTML does allow you to embed
-Python *expressions* (a == 1) into HTML-like tags.  It provides
-flow control and conditional logic by way of "special" HTML tags.
+language's code into a page. DTML does allow you to embed
+Python *expressions* (a == 1) into tags.  It provides
+flow control and conditional logic by way of "special" tags.
 It is more similar to Perl's 'HTML::Template' package than it is
 to mod_perl in this way.  It can also be compared to the web
 server facility of Server Side Includes (SSI), but with far more
@@ -37,12 +36,9 @@
 When To Use DTML
 ----------------
 
-If you want to make a set of dynamic web pages that share bits of
-content with each other, and you aren't working on a project that
-calls for a tremendous amount of collaboration between programmers
-and tool-wielding designers, DTML works well.  Likewise, if you
-want to dynamically create non-HTML text (like CSS stylesheets or
-email messages), DTML can help.
+If you don't want to use page templates for whatever reason DTML might work
+well. Likewise, if you want to dynamically create non-HTML text (like CSS
+stylesheets or email messages), DTML can help.
 
 When Not To Use DTML
 --------------------
@@ -54,20 +50,20 @@
 and displaying content.  While it may be possible to implement
 complex algorithms in DTML, it is often painful.
 
-For example, let's suppose you want to write a web page which
+For example, let's suppose you want to output some text which
 displays a representation of the famous `Fibonacci sequence
 <http://www.mathacademy.com/pr/prime/articles/fibonac/index.asp>`_.
 You would not want to write the program that actually makes the
 calculation of the Fibonacci numbers by writing DTML.  It could be
 done in DTML, but the result would be difficult to understand and
-maintain.  However, DTML is perfect for describing the page that
+maintain.  However, DTML is perfect for describing the output that
 the results of the Fibonnacci calculations are inserted into.  You
 can "call out" from DTML to Script (Python) objects as necessary
 and process the results of the call in DTML.  For example, it is
 `trivial in Python <http://docs.python.org/tutorial/introduction.html>`_
 (search for the word Fibonacci on this page) to implement a Fibonacci
-sequence generator, and trivial in DTML to create a dynamic web
-page which shows these numbers in a readable format.  If you find
+sequence generator, and trivial in DTML to create some dynamic 
+output which shows these numbers in a readable format.  If you find
 yourself creating complex and hard-to-understand logic in DTML,
 it's likely time to explore the the Zope features which allow you
 to script "logic" in Python, while letting DTML do the
@@ -79,25 +75,6 @@
 better off doing it in Python, which has more powerful string
 processing capabilities than DTML.
 
-Zope has a technology named `Zope Page emplates <ZPT.html>`_
-which has purpose similar to DTML.  DTML and ZPT are both
-facilities which allow you to create dynamic HTML.  However, DTML
-is capable of creating dynamic text which is *not* HTML, while ZPT
-is limited to creating text which is HTML (or XML).  DTML also
-allows users to embed more extensive "logic" in the form of
-conditionals and flow-control than does ZPT.  While the source to
-a ZPT page is almost always "well-formed" HTML through its
-lifetime, the source to DTML pages are not guaranteed to be
-"well-formed" HTML, and thus don't play well in many cases with
-external editing tools such as Dreamweaver.
-
-Both ZPT and DTML are fully supported technologies in Zope, and
-neither is "going away" any time soon.  A discussion about when to
-use one instead of the other is available in the chapter entitled
-`Using Basic Zope Objects <BasicObject.html>`_ in the section entitled
-"ZPT vs. DTML: Same Purpose, Different Audiences", but the choice
-is sometimes subjective.
-
 The Difference Between DTML Documents and DTML Methods
 ------------------------------------------------------
 
@@ -117,8 +94,8 @@
 
 DTML Documents are *content* objects (in the vernacular used in
 the chapter entitled `Using Basic Zope Objects`_).
-If you want to create a "stand-alone" HTML or text document, you
-might create a DTML Document object to hold the HTML or text.
+If you want to create a "stand-alone" text document, you
+might create a DTML Document object to hold the text.
 DTML Document objects have their own *properties* (attributes),
 unlike DTML Methods.
 
@@ -193,7 +170,7 @@
 
   <dtml-in mySequence>
 
-    <!-- this is an HTML comment inside the in tag block -->
+    this is a text inside the dtml-in tag block
 
   </dtml-in>
 
@@ -262,7 +239,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 DTML commands are written as tags that begin with *dtml-*.  You
-create dynamic content in DTML by mixing HTML tags and DTML tags
+create dynamic content in DTML by mixing content and DTML tags
 together.  Inserting the value of a variable (a variable is also
 known as a "target") into HTML is the most basic task that you can
 perform with DTML.  Many DTML tags insert variable values, and
@@ -620,7 +597,7 @@
    HTTP_ACCEPT_LANGUAGE 'en-us, en;q=0.50'
    REMOTE_ADDR '192.168.1.3'
    SERVER_NAME 'saints'
-   HTTP_USER_AGENT 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a+) Gecko/20020629'
+   HTTP_USER_AGENT 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a+)'
    HTTP_ACCEPT_CHARSET 'ISO-8859-1, utf-8;q=0.66, *;q=0.66'
    CONNECTION_TYPE 'keep-alive'
    channel.creation_time 1027876407
@@ -630,7 +607,6 @@
    HTTP_HOST 'localsaints:8084'
    REQUEST_METHOD 'GET'
    PATH_INFO '/DTML_Example/show_request'
-   SERVER_SOFTWARE 'Zope/(unreleased version, python 2.1.3, linux2) ZServer/1.1b1'
    HTTP_REFERER 'http://localsaints:8084/DTML_Example/infoForm'
 
 You have instructed the 'show_request' method to render the
@@ -923,12 +899,11 @@
 
   <dtml-var objectValues>
 
-will call the method.
-However:
+will call the method. However::
 
   <dtml-var expr="objectValues">
 
-... will *not* call the method, it will just try to insert
+will *not* call the method, it will just try to insert
 it. The result will be not a list of objects but a string such
 as '<Python Method object at 8681298>'. If you ever see results
 like this, there is a good chance that you're returning a
@@ -991,14 +966,13 @@
 Appendix A. Here's a sampling of *var* tag attributes.
 
 html_quote
-  This attribute causes the inserted values to be HTML quoted.  This means
-  that '<', '>' and '&' are escaped.  Note that as of Zope 2.6, all string
-  values which are retrieved from the REQUEST namespace are HTML-quoted by
-  default.  This helps to prevent "cross-site scripting" security holes
-  present in earlier Zope versions, where a user could insert some clever
-  JavaScript into a page in order to possibly make you divulge information
-  to him which could be private.  For more information, see the `CERT
-  advisory <http://www.cert.org/advisories/CA-2000-02.html>`_ on the topic.
+  This attribute causes the inserted values to be HTML quoted. This means that
+  '<', '>' and '&' are escaped. Note that all string values which are retrieved
+  from the REQUEST namespace are HTML-quoted by default. This helps to prevent
+  "cross-site scripting" security holes, where a user could insert some clever
+  JavaScript into a page in order to possibly make you divulge information to
+  him which could be private. For more information, see the `CERT advisory
+  <http://www.cert.org/advisories/CA-2000-02.html>`_ on the topic.
 
 missing
   The missing attribute allows you to specify a default value to use in
@@ -1017,12 +991,6 @@
   the cost for one adult to visit the Zoo.  Give this property
   the value '2.2'.
 
-    % Anonymous User - Oct. 31, 2003 11:02 am:
-     I think this is the first mention of Properties.... Would be
-     helpful to explain that the properties are found with the
-     properties tag....since up until nos almost all additions have
-     been done by the pulldown menu.:)
-
   You can display this cost in a DTML Document or Method like so::
 
     One Adult pass: <dtml-var adult_rate fmt=dollars-and-cents>

Modified: zope2book/trunk/source/RelationalDatabases.rst
===================================================================
--- zope2book/trunk/source/RelationalDatabases.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/RelationalDatabases.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -49,11 +49,6 @@
   expensive and complex. Oracle can be purchased or evaluated from
   the `Oracle Website <http://www.oracle.com/index.html>`_.
 
-DB2
-  DB2 from IBM is the main commercial competitor to Oracle.
-  It has similar power but also similar expense and complexity.
-  More information from http://www.ibm.com/software/data/db2/ .
-
 PostgreSQL
   PostgreSQL is a leading open source relational
   database with good support for SQL standards.  You can
@@ -65,16 +60,6 @@
   can find more information about MySQL at the `MySQL web
   site <http://www.mysql.com/>`_. 
 
-SAP DB
-  An open source database developed by SAP. Has an Oracle 7
-  compatibility mode. More information and downloads from 
-  http://www.sapdb.org/ .
-
-Sybase
-  Sybase is another popular commercial relational database.
-  Sybase can be purchased or evaluated from the 
-  `Sybase Website <http://www.sybase.com/>`_.
-
 SQL Server
   Microsoft's full featured SQL Server for the
   Windows operating systems. For any serious use on Windows, it is
@@ -119,13 +104,6 @@
   `ZMySQLDA <http://www.zope.org/Members/adustman/Products/ZMySQLDA>`_
   Available as source and a Linux binary package.
 
-SAP DB
-  `ZsapdbDA <http://www.zope.org/Members/jack-e/ZsapdbDA>`_ by Ulrich Eck.
-
-Sybase
-  `SybaseDA <http://www.zope.org/Products/DA/SybaseDA/>`_ is 
-  written by Zope Corporation (but no longer maintained).
-
 SQLServer
   `mxODBC <http://www.egenix.com>`_ is written by Egenix
   and very well maintained. There is also
@@ -134,11 +112,6 @@
   for the Windows platform only. This DA is no longer actively
   maintainted.
 
-Interbase/Firebird
-  There are a number of DAs available including
-  `kinterbasdbDA <http://www.zope.org/Members/mwoj/kinterbasdbDA>`_ and
-  `gvibDA <http://www.zope.org/Members/bkc/gvibDA>`_.
-
 If you will need to connect to more than one database or wish to connect
 as to the same database as different users then you may use multiple
 database connection objects.
@@ -999,12 +972,12 @@
 
   http://example.org/Departments/Support/requisitionSomethingForm
 
-... and requisition some punching bags for the Support department.
+and requisition some punching bags for the Support department.
 Alternatively, you could go to::
 
   http://example.org/Departments/Sales/requisitionSomethingForm
 
-..and requisition some tacky rubber key-chains with your logo on
+and requisition some tacky rubber key-chains with your logo on
 them for the Sales department.  Using Zope's security system as
 described in the chapter entitled `Users and
 Security <Security.html>`_, you can now restrict access to these forms

Modified: zope2book/trunk/source/SearchingZCatalog.rst
===================================================================
--- zope2book/trunk/source/SearchingZCatalog.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/SearchingZCatalog.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -693,18 +693,12 @@
 
   ## Script (Python) "relevantSectionNews"
   ##
-  """ Returns relevant, non-catastropic news """"
+  """ Returns relevant, non-catastropic news """
   id=context.getId()
   return context.NewsCatalog(
            {'contentTextIdx' : id + ' -catastrophic'}
           )
 
-  % guillaume_benoit - Mar. 4, 2004 8:40 am:
-   Little error:
-   """ Returns relevant, non-catastropic news """"
-   ... should be ...
-   """ Returns relevant, non-catastropic news """
-
 ZCTextIndexes are very powerful.  When mixed with the Automatic
 Cataloging pattern described later in the chapter, they give you
 the ability to automatically full-text search all of your
@@ -752,7 +746,7 @@
 processing elements.  Implementing a pipeline element is out of
 the scope of this book; for examples of implementing and
 registering a pipeline element see
-eg. 'lib/python/Products/ZCTextIndex/Lexicon.py'.  A pipeline
+eg. 'Products.ZCTextIndex.Lexicon.py'.  A pipeline
 element should conform to the 'IPipelineElement' interface.
 
 To create a ZCTextIndex, you first have to create a Lexicon
@@ -1490,7 +1484,7 @@
 words appear earlier in the the stream, but this gives
 you an idea of what is stored.)
 
-This is a neccessary and positive step to make the index
+This is a necessary and positive step to make the index
 use less storage and less memory, and increases search
 results, as your site user doesn't have to worry about
 getting incidental words ("the", "a", etc.) correct,
@@ -1638,23 +1632,23 @@
 ZCatalogs and CMF/Plone
 ~~~~~~~~~~~~~~~~~~~~~~~
 
-  The CMF was built from the ground up to understand the
-  difference between things that are "content", such as a news item
-  or press release, and those things that are not, such as
-  a DTMLMethod used to show a press release, or a ZCatalog
-  object.  In addition, the CMF includes several stock items
-  that are intended to be used for content, including:
-  Document, Event, NewsItem, and others.  These content items
-  are already set up for autocataloging, so that any changes
-  made will appear in the catalog.
+The CMF was built from the ground up to understand the
+difference between things that are "content", such as a news item
+or press release, and those things that are not, such as
+a DTMLMethod used to show a press release, or a ZCatalog
+object.  In addition, the CMF includes several stock items
+that are intended to be used for content, including:
+Document, Event, NewsItem, and others.  These content items
+are already set up for autocataloging, so that any changes
+made will appear in the catalog.
 
-  In non-CMF Zope, the traditional name for a general-purpose
-  catalog is 'Catalog' (though you can always create your own
-  catalog with any id you want; we've used the example
-  'AnimalCatalog' in this chapter for a special-purpose catalog
-  for searching animal-specific info in our zoo.)  Even though
-  'Catalog' is the traditional name, Zope does not come with
-  such a catalog in the ZODB already, you have to create it.
+In non-CMF Zope, the traditional name for a general-purpose
+catalog is 'Catalog' (though you can always create your own
+catalog with any id you want; we've used the example
+'AnimalCatalog' in this chapter for a special-purpose catalog
+for searching animal-specific info in our zoo.)  Even though
+'Catalog' is the traditional name, Zope does not come with
+such a catalog in the ZODB already, you have to create it.
 
 In CMF (and Plone, an out-of-the-box portal system built
 on top of the CMF), there is always a catalog created, called
@@ -1674,29 +1668,6 @@
 like title, description, body, etc., so that they can be
 general-text searched.
 
-Keeping Non-ZODB Content in ZCatalog
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-The ZCatalog is such a useful and powerful tool for searching,
-it's possible that you may want to use it to search data that
-is stored in placed other than in the ZODB.  Later in this book,
-you'll learn about storing data in relational databases and
-being able to access and view that data from Zope.  While Zope
-excels at working with relational databases, many databases
-have poor full-text-indexing capabilities.  In addition, site
-visitors may want to search your site, as described above, for
-a single phrase, like "jungle", and not know or care if the 
-information they're looking for is in the ZODB or in a
-relational database.
-
-To help with this, you can store information about relational
-database information in the ZCatalog, too.  It's an advanced
-technique, and will require that you understand ZSQLMethods
-(described in the relational database chapter) and Python
-scripting.  You can learn about this technique in
-`Cataloging SQL Data and Almost Anything Else
-<http://zope.org/Members/rbickers/cataloganything>`_.
-
 Add-On Index Types
 ------------------
 

Modified: zope2book/trunk/source/Sessions.rst
===================================================================
--- zope2book/trunk/source/Sessions.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/Sessions.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -83,14 +83,16 @@
 Session Manager Components
 ==========================
 
-- **Browser Id Manager**
-  This component determines a remote client's "browser id", which uniquely
-  identifies a particular browser. The browser id is encoded in a
-  form/querystring variable, a cookie variable, or as part of the URL. The
-  browser id manager examines cookies, form and querystring elements, and URLs
-  to determine the client's browser id. It can also modify cookies and URLs
-  automatically in order to differentiate users between requests.
+Browser Id Manager
+++++++++++++++++++
 
+This component determines a remote client's "browser id", which uniquely
+identifies a particular browser. The browser id is encoded in a
+form/querystring variable, a cookie variable, or as part of the URL. The
+browser id manager examines cookies, form and querystring elements, and URLs
+to determine the client's browser id. It can also modify cookies and URLs
+automatically in order to differentiate users between requests.
+
 - There may be more than one browser id manager in a Zope installation, but
   commonly there will only be one. Application developers will generally not
   talk directly to a browser id manager. Instead, they will use the Transient
@@ -106,15 +108,17 @@
 
     /browser_id_manager object
 
-- **Session Data Manager**
-  This component is responsible for handing out session data to callers. When
-  session data is required, the session data manager:
+Session Data Manager
+++++++++++++++++++++
 
-  * talks to a browser id manager to determine the current browser id-
+This component is responsible for handing out session data to callers. When
+session data is required, the session data manager:
 
-  * creates a new session data object or hands back an existing session data
-    object based on the browser id.
+* talks to a browser id manager to determine the current browser id-
 
+* creates a new session data object or hands back an existing session data
+  object based on the browser id.
+
 - Developers generally do not directly use methods of session data managers to
   obtain session data objects. Instead, they rely on the built-in
   REQUEST.SESSION object, which represents *the current session data object
@@ -132,10 +136,12 @@
 
     /session_data_manager
 
-- **Transient Object Container**
-  Also known as Session Data Containers, these components actually hold
-  information related to sessions.
+Transient Object Container
+++++++++++++++++++++++++++
 
+Also known as Session Data Containers, these components actually hold
+information related to sessions.
+
 - Currently, a Transient Object Container is used to hold a special "transient
   data object" instance for each ongoing session. Developers will generally not
   interact with transient data containers. Transient data containers are
@@ -153,10 +159,12 @@
 
   Transient Object container are lost each time Zope is restarted.
 
-- **Transient Data Object**
-  Also known as the Session Data Object. These are the objects which are stored
-  in session data containers and managed by transient data managers.
+Transient Data Object
++++++++++++++++++++++
 
+Also known as the Session Data Object. These are the objects which are stored
+in session data containers and managed by transient data managers.
+
 - Developers interact with a transient data object after obtaining one via
   REQUEST.SESSION or from a session data manager directly. A single transient
   data object actually stores the useful information related to a single user's
@@ -270,9 +278,7 @@
 developers to get and set data. Session data objects are also "wrapped" in the
 acquisition context of their session data manager, so you may additionally call
 any method on a session data object that you can call on a session data
-manager. For information about the API of a session data manager and a session
-data object, see the Zope Help system item in "Zope Help" -> "API Reference" ->
-"Session API".
+manager.
 
 Obtaining A Session Data Object
 +++++++++++++++++++++++++++++++
@@ -309,7 +315,7 @@
 
 method. In ZPT::
 
-<span tal:define="data python:context.session_data_manager.getSessionData(create=0)">
+  <span tal:define="data python:context.session_data_manager.getSessionData(create=0)">
 
 Note: create=0 means return a reference to the session or None. create=1 means
 return a reference if one exists or create a new Session object and the
@@ -931,7 +937,7 @@
 browser id manager with respectively restrictive security settings.
 
 In the container of your choosing, select "Browser Id Manager" from the add
-dropdown list in the Zope management interface. When you add a new browser id
+drop-down list in the Zope management interface. When you add a new browser id
 manager, the form options available are:
 
 Id
@@ -961,17 +967,13 @@
   you've also got the `URLs` setting of "Look for Browser Id in" checked off.
 
 Cookie Path
-  this is the `path` element which should be sent in the browser id cookie. For
-  more information, see the Netscape Cookie specification at
-  http://home.netscape.com/newsref/std/cookie_spec.html.
+  this is the `path` element which should be sent in the browser id cookie.
 
 Cookie Domain
   this is the "domain" element which should be sent in the browser id cookie.
-  For more information, see the Netscape Cookie specification at
-  http://home.netscape.com/newsref/std/cookie_spec.html. Leaving this form
-  element blank results in no domain element in the cookie. If you change the
-  cookie domain here, the value you enter must have at least two dots (as per
-  the cookie spec).
+  Leaving this form element blank results in no domain element in the cookie.
+  If you change the cookie domain here, the value you enter must have at least
+  two dots (as per the cookie spec).
 
 Cookie Lifetime In Days
   browser id cookies sent to browsers will last this many days on a remote
@@ -989,11 +991,9 @@
   the same browser, do not set this flag.
 
 After reviewing and changing these options, click the "Add" button to
-instantiate a browser id manager.
+instantiate a browser id manager. You can change any of a browser id manager's
+initial settings by visiting it in the management interface.
 
-You can change any of a browser id manager's initial settings by visiting it in
-the management interface.
-
 Instantiating A Session Data Manager (Optional)
 +++++++++++++++++++++++++++++++++++++++++++++++
 
@@ -1013,7 +1013,7 @@
 first acquired browser id manager.
 
 Choose "Session Data Manager" within the container you wish to house the
-session data manager from the "Add" dropdown box in the Zope management
+session data manager from the "Add" drop-down box in the Zope management
 interface.
 
 The session data manager add form displays these options:
@@ -1416,7 +1416,7 @@
 ConflictErrors in the Zope debug log (or they may be printed to the console
 from which you run Zope). An example of one of these errors is as follows::
 
-  2001-01-16T04:26:58 INFO(0) Z2 CONFLICT Competing writes at, /getData
+  2009-01-16T04:26:58 INFO(0) Z2 CONFLICT Competing writes at, /getData
   Traceback (innermost last):
   File /zope/lib/python/ZPublisher/Publish.py, line 175, in publish
   File /zope/lib/python/Zope/__init__.py, line 235, in commit

Modified: zope2book/trunk/source/VirtualHosting.rst
===================================================================
--- zope2book/trunk/source/VirtualHosting.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/VirtualHosting.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -1,24 +1,10 @@
 Virtual Hosting Services
 ========================
 
-Zope comes with two objects that help you do virtual hosting,
-*SiteRoot* and *Virtual Host Monster*. Virtual hosting is a way to
+Zope comes with one object that help you do virtual hosting:
+*Virtual Host Monster*. Virtual hosting is a way to
 serve many websites with one Zope server.
 
-*SiteRoots* are an artifact of an older generation of Zope virtual
-hosting services that are only retained in current Zope versions
-for backwards-compatibility purposes.  They are not documented in
-this book because they are somewhat "dangerous" for new users, as
-they have the capability of temporarily "locking you out" of your
-Zope instance if you configure them improperly.  Luckily, we have
-*Virtual Host Monsters*, which do everything that SiteRoots do and
-more without any of the dangerous side effects of SiteRoots.  If
-you want to do virtual hosting in Zope, you should almost
-certainly be using a *Virtual Host Monster*.  If you have previously
-added SiteRoot objects to your Zope, you should remove them before
-adding the VirtualHostMonster, in order to avoid having them both
-try to control virtual hosting.
-
 Virtual Host Monster
 --------------------
 
@@ -73,7 +59,7 @@
 VirtualHostMonster is one of the add menu items supplied by the
 stock Zope Product, 'SiteAccess'.  You can add one to any folder
 by selecting its entry from the add menu and supplying an ID for
-it (the ID you choose doesn't matter, exept that it must not
+it (the ID you choose doesn't matter, except that it must not
 duplicate the ID of another object in that folder).
 
 Where to Put a Virtual Host Monster And What To Name It
@@ -100,7 +86,7 @@
 It is possible to modify the VHM settings from the command line
 via Zope debugger;  no documentation for the low-level API
 exists, however, except "the source",
-'$SOFTWARE_HOME/lib/python/Products/SiteAccess/VirtualHostMonster.py,
+'Products.SiteAccess.VirtualHostMonster.py,
 which makes it an inadvisable choice for anyone but an experienced
 Zope developer.
 
@@ -303,17 +289,17 @@
 which essentially says "traverse to the vhm_root folder as if it
 were the root of the site."
 
-Arranginging for Incoming URLs to be Rewritten
-----------------------------------------------
+Arranging for Incoming URLs to be Rewritten
+-------------------------------------------
 
 At this point, you're probably wondering just how in the world
 any of this helps you.  You're certainly not going to ask
 people to use their browser to visit a URL like
 'http://yourserver.com//VirtualHostBase/http/zope.com/vhm_test/VirtualHostRoot/'
 just so your Zope-generated URLs will be "right".  That would
-defeat the pupose of virtual hosting entirely.  The answer is:
+defeat the purpose of virtual hosting entirely.  The answer is:
 don't ask humans to do it, ask your computer to do it.  There
-are two common (but mutually excusive) ways to accomplish
+are two common (but mutually exclusive) ways to accomplish
 this: via the VirtualHostMonster *Mappings* tab and via Apache
 "rewrite rules" (or your webserver's facility to do the same
 thing if you don't use Apache).  Be warned: use either one of
@@ -382,7 +368,7 @@
 Note that it is not possible to rewrite the port part
 (by default, '8080') of the URL this way. To change the
 port Zope is listening on, you will have to configure
-Zopes' start parameter or use Apache rewriting.
+Zope's start parameter or use Apache rewriting.
 
 Apache Rewrite Rules
 ~~~~~~~~~~~~~~~~~~~~
@@ -432,7 +418,7 @@
 hostname 'www.example.com' through a browser (also on your
 local host) and this makes it possible.
 
-Note:  On MacOS X Server 10.3, the 'Server Admin.app' program
+Note:  On MacOS X Server, the 'Server Admin.app' program
 simplifies adding virtual host definitions to your Apache.
 This application can make and maintain virtual host , access
 log, etc. 
@@ -450,7 +436,7 @@
   RewriteRule ^/(.*) http://127.0.0.1:8080/VirtualHostBase/http/www.example.com:80/vhm_test/VirtualHostRoot/$1 [L,P]
   </VirtualHost>
 
-If you want to proxy SSL to Zope, you need a similar diretive
+If you want to proxy SSL to Zope, you need a similar directive
 for port 443::
 
    NameVirtualHost *:443
@@ -493,11 +479,6 @@
 path;  otherwise, the object will be findable when using the site
 without virtual hosting, but not with, or vice versa.
 
-In the CMF, the 'portal_catalog' tool does not (yet, as of 1.5 beta),
-do the right thing here when indexing content.  Plone (?) has a
-CMFCatalogPathAware class (sp?) which you can use in place of the
-stock CMF's CMFCatalogAware base class to help with this issue.
-
 "Inside-Out" Virtual Hosting
 ----------------------------
 

Modified: zope2book/trunk/source/ZPT.rst
===================================================================
--- zope2book/trunk/source/ZPT.rst	2009-02-17 18:29:56 UTC (rev 96646)
+++ zope2book/trunk/source/ZPT.rst	2009-02-17 19:17:54 UTC (rev 96647)
@@ -593,7 +593,7 @@
 (*METAL*) statements.  Here's an example macro definition::
 
   <p metal:define-macro="copyright">
-    Copyright 2001, <em>Foo, Bar, and Associates</em> Inc.
+    Copyright 2009, <em>Foo, Bar, and Associates</em> Inc.
   </p>
 
 This 'metal:define-macro' statement defines a macro named "copyright".
@@ -617,7 +617,7 @@
 
   <hr />
   <p>
-    Copyright 2001, <em>Foo, Bar, and Associates</em> Inc.
+    Copyright 2009, <em>Foo, Bar, and Associates</em> Inc.
   </p>
 
 If you change the macro (for example, if the copyright holder changes)
@@ -855,7 +855,7 @@
       </p>
 
       <span metal:define-slot="footer">
-        <p>Copyright 2001 Fluffy Enterprises</p>
+        <p>Copyright 2009 Fluffy Enterprises</p>
       </span>
 
     </body>



More information about the Checkins mailing list