[Zope3-dev] Alternate schema types
Tres Seaver
tseaver at palladion.com
Tue Jul 12 11:01:29 EDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I would like to break the hard-wired assumption in the forms / widgets
machinery that all schemas must be interfaces with fields; in
particular, I would like to make the introspection of the fieldset from
a given schema pluggable.
My motivation here is to make it possible to use schemas defined outside
of filesystem Python code play with the forms framework:
- RDBMS tables and views have introspectable schemas;
- Applications like CPSSchemas allow the business user to define
content schema in the CMF equivalent of a site manager; such
schemas are clearly introspectable.
- RelaxNG, W3Schema, DTD, etc. *might* fit into the framework (but
might require explicit registration of a helper component).
In particular, I would like to tweak zope.app.form.utility.setUpWidgets
such that it does an adapter lookup, in place of the current invocation
of '_fieldlist' (the default adapter would do what '_fieldlist' does now).
I'm attaching a diff which sketches what such a refactoring would look
like. Comments?
Tres.
- --
===================================================================
Tres Seaver +1 202-558-7113 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFC09tI+gerLs4ltQ4RAs0bAKC4LZ0C/7YQSOk5Kf0wE3b5anKM/wCgwR1l
KCGW5uaqI8z4Q++gz9SEV/E=
=/WH4
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: schema_adaptation.diff
Type: text/x-patch
Size: 4370 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20050712/54dd020f/schema_adaptation.bin
More information about the Zope3-dev
mailing list