cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject [C2] Proposal for "generator" URL protocol
Date Thu, 15 Mar 2001 20:39:33 GMT
Keeping in mind with the Separation of Concerns pattern,
I would like to simplify some Enterprise development functionality.
Our company has come up with some informational DTDs that
represent key consepts in our system.  What would benefit us
is the ability to write a custom generator that supplies
those compositional units.  Right now, we are forced to implement
that functionality as LogicSheets.  It is much easier for
us to write and test a Generator than it is to do LogicSheets.

The protocol would allow us to Xinclude or util:include those
units in approval and summary forms.

The URL would be used like this:

<util:include-uri href="generator://my-generator/source?parameter1=1&parameter2=2"/>

That would translate into roughly the following code:

StringTokenizer tok = new StringTokenizer(url, "/?&");
Generator gen = (Generator) generatorSelector.select(tok.nextToken());
String source = tok.nextToken();
Parameters params = new Parameters();

while(tok.hasMoreTokens()) {
    StringTokenizer param = new StringTokenizer(tok.nextToken(), "=");
    params.setParameter(param.nextToken(), param.nextToken());
}

gen.setup(resolver, objectModel, source, params);

This would allow me to create the generators using XSP, but without the
hastle of LogicSheet writing.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message