cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Burton" <ross.bur...@mail.com>
Subject Re: simple processor example code?
Date Wed, 05 Apr 2000 08:32:26 GMT
> > I was wondering if someone had simple example code for writing a
> > processor for cocoon.  I am looking at the source code for processors
> > which comes with cocoon, but the code samples aren't helping me very
> > much.  Hopefully someones example code would include the parsing of a
> > tag within a new namespace.
> >
> > Forgive me if this is a simple thing to do, but I'm finding myself
> > staring at the source code with cocoon and going nowhere.
>
> It's easy. The main method you need to write is this:
>
> public Document process(Document document, Dictionary parameters)
>
> you take in an org.w3c.dom.Document object, and you spit one out. could be
> the same one with mods, could be a new one created from scratch. your
> call.

I've got an AbstractProcessor class somewhere - if your processor meets a
set of restrictions it takes much of the pain out of processor writing.
I'll post it tonight when I can find it!

> sounds like you're unfamiliar with DOM programming. good luck. it sucks.

:-) What about SAX programming!  [shudder]

Ross



Mime
View raw message