[ZDP] Re: [Zope] object modification date - how ?

Martijn Faassen M.Faassen@vet.uu.nl
Tue, 16 Mar 1999 10:37:52 +0100


Pavlos Christoforou wrote:
[snip]
> One thing I have in mind is to revert to a previous version of the DTD
> where an xml faq doc is composed of entries alone, and subelements of the
> entries indicate the section, subsection etc that the entry belongs to, in
> line with Ken's suggestion. However mapping such a structure into a useful
> Zope hierarchy will not be a simple matter. I guess if Zope supported
> links then we could have all the entries in a Zope folder and section
> folders could contain appropriate links into the entries folder.

Can't #var tags essentially do this? You could have a main FAQ folder,
perhaps with a subfolder with all FAQ entries inside. Each FAQ entry is,
for instance, a DTML document with properties associated, or perhaps
just a folder with a document inside, with properties.

Then you have other subfolders, one for each section view on the FAQ.
Perhaps the complete list of sections can even be dynamically extracted
from the individual FAQs, or perhaps we have a master list of what
sections may be used, and each FAQ entry can indicate to which sections
it belongs.

Each section subfolder, when viewed, somehow (probably through some bit
of Python code) extracts the list of all FAQ entries which are part of
the section. Then all these entries are 'rendered' in some particular
order (see the discussion on FAQ ordering elsewhere in the thread). Then
we have a list of what entries to include in the section, in a
particular order. Because of acquisition, the folder containing all FAQ
entries is also a subfolder of the section subfolder. So, we should be
able to create DTML roughly like this (with a bit of convolution mainly
due to the '-' in sequence-item:

<!--#in section_entries-->

<!--#with AllEntries->
<!--#var "_[_['sequence-item']]"-->
<!--#/with-->

<!--#var /in-->

This would render the FAQ for that subsection, right?

Or am I missing something here?
 
> Also I would like to avoid including information about the order of the
> entries or sections in the xml document. Just think of the trouble the
> maintainer would have to go everytime there was a need for renumbering.

See my later answers in this thread for some horridly complicated ideas
on FAQ order issues. :)

Regards,

Martijn