[Zope-CMF] Class based vs TTW for Schemas.

Lennart Regebro regebro at nuxeo.com
Wed Feb 25 12:15:10 EST 2004


Sidnei da Silva wrote:
> (schema1+schema2=newschema). From what I understand about your
> description, you would like to have a 'schema repository' where you
> can see (and maybe modify) existing schemas.

See and modify, yes.

> Thats a nice goal,
> IMHO. It would also allow for one to tie a schema to a class using a
> name, which would be looked up on this 'schema repository'.

OK, that is one step toward merge identified. :)

An idea struck me here: We already have this schema repository, called 
portal_schemas (duh!). One way to do this could be by allowing two types 
of schemas, CPS Schemas and Archetypes schemas in the repository?

Or? Of course a common API would have to be defined for the schemas too. 
Hmm. OK, maybe it wasn't that simple. Ah well.

> It's an instance of a 'Schema' class, which has methods for modifying
> the schema. (addField, removeField, etc).

With the above repository that is no problem then.

> You can do the same on Archetypes, though its not the default setup
> and we dont have a vocabularies tool. 

So another step would be making the schemas use out portal_vocabularies 
then. That's good, I hoped it would be that easy.

  > I've given some thought to this subject too, and I came to the
> conclusion that this could be easily achieved by having a 'Dummy'
> cmf-aware content type, that would be then used to create new portal
> types using the types tool, and then one could just attach archetypes
> schemas to this portal type. (optimally using Kapil's Annotations tool)

Well, that sounds similar to what we have done, yes. We have a type 
class which you instantiate in the types tool and attach a schema, 
layout and a bunch of other stuff to it.


Very informative response, thanks!



More information about the Zope-CMF mailing list