[Zope3-dev] schema initial documentation

R. David Murray bitz@bitdance.com
Mon, 22 Apr 2002 14:29:48 -0400 (EDT)


On Mon, 22 Apr 2002, Godefroid Chapelle wrote:
> About extensibility, it should be easy to add properties necessary for
> other tasks - I refer to SQL generation you mentioned for example.

Martijn and I had a long discussion about this a little bit ago
(http://irclogs.espnow.com/zope/show_file.php?logfile=2002_03_28.log,
search for '<faassen> rdmurray:", that's where the conversation starts)
in which we tentatively concluded that information like that belongs
in a separate object that is composed with the field, probably using
an adapter or perhaps specialized zcml.  We didn't try to work out
what this would look like, though.

> About declarativ'ity', this would allow to check the validity (according to
> the infrastructure it is meant for) of the schema.
>
> IOW I would like to have it declared in XML in place of Python. It would be
> really easy to generate the Python text from XML if needed and would allow
> to check (at least partly) the semantics expressed through the writing of
> DTD or XML schema.

I'd like to be convinced that having it in XML buys you something
important.  The Schema declaration in python is, well, declaritive,
and the Schema can have methods that allow you to check whatever it
is you need to check.  I don't immediately see that xml buys you
anything here.  If I understand what you are driving at with the
DTD/XML schema comment, I think perhaps my note above about putting
"alternate" data into seperate objects makes that less useful for
Fields themselves.

--RDM