cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: Novel persistence approach and Cocoon
Date Mon, 02 Sep 2002 09:53:52 GMT

Robert Leftwich wrote:
>
> At 10:44 PM 30/08/2002, Carsten Ziegeler wrote:
>
> >I don't understand exactly what you mean - you could (easily) write
> >a transformer interacting with business objects managed by a
> >a prevalent system. For example for reading
> ><read businessObject="identifer for the object">
> >    <name>
> >    <street>
> ></read>
> >
> >This is interpreted by the transformer into something like:
> >   object o = getBusinessObject("identifier for the object">
> >   o.getName();
> >   o.getStreet();
> >And the results are inserted into the SAX stream.
> >
> >And the way back could look like this:
> ><write businessObject="identifer for the object">
> >    <name>some name</name>
> >    <street>and a street</street>
> ></write>
> >etc.
> >
> >Is this the way you mean?
>
> No, probably because I hadn't seen a tie-in at the transformer level to
> business objects before - I've only ever seen XSP used to access bo's and
> at this point I am staying away from XSP (but as I said my knowledge of
> Cocoon internals is minimal at this point in time).
> The main reason I hadn't thought along these lines is that I am taking a
> more document-centric rather than data-centric view and as such I want to
> persist things as xml documents rather than 1 or more bo's.
> Further to using the SourceWritingTransformer as a starting point, it
> appears to be a write-only solution, requiring a separate generator to do
> the reading. Maybe I am missing something important here but I
> think what I
> am looking for is a non-stream based read/write component that can act as
> both a generator and write-able transformer as does FileSource.
> Is there a
> sample of such a beast or am I on the wrong track ?
>
So you want something like this, I guess:

<map:generate src="bo://some_document_identifier"/>

for reading an XML document and you want to use the SourceWritingTransformer
to save XML back into your bo.
Is this what you are thinking of?

Of yes, the "only" thing you have to do is to write your own protocol
which is writeable. An example for this is the xmldb protocol which reads
XML documents from an XML database - ok the writing part is currently
missing.

HTH
Carsten


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


Mime
View raw message