cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruce G. Robertson" <>
Subject DOM to DOM processing options
Date Wed, 27 Sep 2000 21:16:21 GMT

at, I've been using Cocoon for about two months now
simply to dynamically apply xslts to historical xml data. In fact, I'd
say that cocoon makes a pretty fantastic development
environment for xslt/xml: it frees you from having to run xalan over a
file by hand! Experimenters rejoice!

Now I'm working on a more complicated transformation, one that takes xml
historical data and turns it into SVG timelines. The nicest results come
when I use the java 2DGraphics API and java's 2d2svg converter. (If 
you're interested in this, steal my code -- its under the LGPL.) This
, however, returns a DOM Document object. My question is: how would
the cocoon community recommend that I integrate such a transformation 
into a cocoon site, keeping in mind that I'd like to make this code as 
useful as possible to other, non-cocoon approaches to xml. 

It seems to me that I have the following options:

1. Xslt-extensions as font-end to the DOM-Document-to-DOM-Document code.
 But even then xalan extensions allows only the return of document
fragments, not whole Document objects, making this a more than usually
ugly hack.

2. Make a Cocoon 1.* Processor, which would just be a wrapper around my 
code that does DOM to DOM. When I switch to Cocoon 2.*, I'll have to 
make this into a SAX-friendly thingy, right?

But is there something less cocoon-specific that I'm missing, like:

3. Write a Servlet?

4. Something else? Particularly in the promised land of Cocoon 2?

Thanks for your time and for the lively and helpful discussion,

Bruce Robertson, Dept. of Classics, Mount Allison University 

View raw message