cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Larson <>
Subject form repository
Date Mon, 02 Feb 2004 16:15:52 GMT
Lets start working on a form repository.

This discussion focuses on the form model, but we could use these same
concepts to handle form binding and form template fragments.

The form fragments in a repository could be called "types" and we could
use Marc's idea of using "id", "type-ref", and "type-def" to indicate
respectively: create a widget, use or extend a type of widget, and
define a new type of widget.  I suggest naming these attributes "id",
"base", and "type" to keep the names short and somewhat parallel the
names used for datatypes.

To allow types (form fragments) to be retrieved from anywhere that can
be referenced as a source we could use import statements of the form:
  <wd:import prefix="some-prefix" uri="some-uri"/>
For example, we could use the "cocoon://" protocol:
  <wd:import prefix="utility" uri="cocoon://utility.xml"/>

When an import statement is encountered in a form, we would need to do
pretty much the same work as is done by the DefaultFormManager's
getFormDefinition(Source) method, and then somehow register the types
found in the source so the form has access to them.  The prefix
specified in the import statement could be used to prevent ambiguity
between types that happen to have matching name but come from different

--Tim Larson

View raw message