cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew C. Oliver" <>
Subject [RT] To SAX or not to SAX (was: Re: Excel generator)
Date Tue, 23 Jul 2002 01:16:50 GMT
Here's the thing.  Everytime I start to write one I get caught in a 

Within POI ( the current "eventmodel" 

for javadoc or

for source) resembles the AWT event model because I happen to like the 
AWT event model.  It was also *sax inspired* but is not sax resembling 
because lets face it...SAX is ugly and smells of old holy socks.

Still SAX is SAX and the mapping between what the event model in poi 
does esentially for an Excel file what SAX intends to do.  This could 
possibly have the unintended (good?) effect of generating easily the 
Excel 2000+ XML format because as far as I can tell, the Excel 2000+ XML 
format is largely just the binary format translated to XML (if we get 
the capitalization and attribute names right).  (I researched that for 
all of 10 minutes before deciding I hated it as an XML format, so don't 
take this as gospel).  If I *did* do that then I'd probably want to 
rewrite the serializer to match.

And if I did that I'd break our compatibility with Gnumeric (and really 
my method of generating simple report stylesheets), but I'm not sure 
thats an issue for many people.  If I can talk Tony Stintes (Java World 
into doing an its XML-lent article or something then maybe more people 
would use the Serializer and have suggestions into the generator but at 
the moment, I've no one to bounce ideas off of.  I've a huge 
(personality trait) barrier to starting something like this if I can't 
make a decision for what path to take.  (too much pride in my work).

As for completely ditching the POI event model for SAX and making the 
cocoon generator a light wrapper around it I've all but decided against 
it for these reasons:

1. A lot of people are using POI but not any particular XML library. 
 The bindings between POI and SAX or JAXP might break under old versions 
of Tomcat and friends.  IN short, XML-jar-hell!  (the prevelant 
situation for XML and Java in a produciton environment)

2. The event model is more natural to the item at hand and does not 
preclude wrapping it with SAX.

So the questions at hand are:

1. What do people want from the generator?  
2. Is preserving compatibility with Gnumeric important?

Decisions I've made:

The generator should be comaptible with the serializer whatever is chosen.

As soon as I resolve these issues writing the generator should be easy.

In the meantime, if someone wants to start it.  understand the 
serializer and how it works 
(org.apache.cocoon.components.elementprocessor.** --which someone is now 
duplicating in the scratchpad with "Tag").  Read up on the POI event 
model.  Do the opposite as the element processor (take XLS and output 
tags).  Should be simple if you're not striving for full functionality.

Sorry long answer to a short question, but I'm on the fence.


Michael Wechner wrote:

> Hi
> Is there an Excel Generator, which creates from an Excel (xls) file
> some XML? Or what approach would you take to convert existing Excel
> documents into some useful XML?
> Thanks  a lot
> Michael
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message