<Class Top Book> not only causes the generated class to be
Top, but also to be a subclass of
Book. This is a
built-in class which has a ``current page'' attribute changeable either
from code inserts, or by
elements as above.
The reason for having this class was to make it easy to send back
different pages from one form. This can be tricky in normal CGI
programming, because the URL that identifies the form's output page is
fixed, having to be specified (as an ``action URL'') when the form is
Before going any further, we need to point out that, in the element
<InstanceSelectionLink instance=Menus book=ROOT>the
bookattributes both refer to instances.
Menusdenotes the ``Menus'' page, and
ROOTdenotes the root or top level instance of the application. Both are examples of paths --- hierarchical names for instances --- which are described further in Section 2.19.
<InstanceSelectionLink> element is an example of an
instance link: an element which, when clicked on, causes another
instance to be displayed. This is how the author can set URLs
to point at one part of an application from another.
In fact, an
<InstanceSelectionLink> not only causes a new
instance to be displayed, but also makes it the current page of a book.
Clicking on the instance selection link for
Fact, for example,
would set the current page to
Fact and then send back that
current page's HTML. If no current page is set, a book will send back
its own HTML. There is also an
<InstanceLink> which links to
an instance but does not select it into a book.