Skip to content

Commit

Permalink
Revise section "URL Traversal"
Browse files Browse the repository at this point in the history
modified:   docs/zdgbook/ObjectPublishing.rst
  • Loading branch information
jugmac00 committed Dec 23, 2018
1 parent 73e058f commit 65651be
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions docs/zdgbook/ObjectPublishing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ URL Traversal
=============

Traversal is the process the publisher uses to locate the published
object. Typically the publisher locates the published object by
object. Typically the publisher locates the published object by
walking along the URL. Take for example a collection of objects::

class Classification:
Expand All @@ -116,29 +116,30 @@ walking along the URL. Take for example a collection of objects::


This collection of objects forms an object hierarchy. Using Zope you
can publish objects with URLs. For example, the URL
'http://zope/vertebrates/mammals/monkey/screech', will traverse the
object hierarchy, find the 'monkey' object and call its 'screech'
can publish objects with URLs. For example, the URL
http://zope/vertebrates/mammals/monkey/screech, will traverse the
object hierarchy, find the *monkey* object and call its *screech*
method.

.. figure:: Figures/2-2.png

2.2 Traversal path through an object hierarchy

The publisher starts from the root object and takes each step in the
URL as a key to locate the next object. It moves to the next object
URL as a key to locate the next object. It moves to the next object
and continues to move from object to object using the URL as a guide.

Typically the next object is a sub-object of the current object that
is named by the path segment. So in the example above, when the
publisher gets to the 'vertebrates' object, the next path segment is
"mammals", and this tells the publisher to look for a sub-object of
the current object with that name. Traversal stops when Zope comes to
the end of the URL. If the final object is found, then it is
is named by the path segment. So in the example above, when the
publisher gets to the *vertebrates* object, the next path segment is
*mammals*, and this tells the publisher to look for a sub-object of
the current object with that name. Traversal stops when Zope comes to
the end of the URL. If the final object is found, then it is
published, otherwise an error is returned.


Now let's take a more rigorous look at traversal.
Now let's take a closer look at traversal.


Traversal Interfaces
====================
Expand Down

0 comments on commit 65651be

Please sign in to comment.