I think it's pretty close (see below), but I'm getting the following exception 
when running from Tomcat:

java.lang.NoClassDefFoundError: 
org/apache/cocoon/caching/CacheableProcessingComponent

I was going to build and install the latest from Cocoon but I can't because the 
build script doesn't work since my JAVA_HOME variable includes a space 
(C:\Program files...).

So... How can I get the latest Cocoon stuff built and/or where can I get the 
missing class/jar from?

Thanks,
Jeff

-----Original Message-----
From: Grzegorz Kossakowski [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 01, 2007 10:36 AM
To: [email protected]
Subject: Re: Custom Transformer

Schmitz, Jeffrey A napisaƂ(a):
> Thanks!
>
> So something like this (did I get the SaxBuffer stuff right?):
>
> public class Mytrans extends AbstractTransformer implements
>               CacheableProcessingComponent {
>
>     XMLConsumer tempConsumer;
>     SaxBuffer mySaxConsumer = new SaxBuffer();
>     String content;
>
>     public void setup(SourceResolver resolver, Map objectModel, String src,
>                       Parameters params) throws ProcessingException, 
> SAXException,
>                       IOException {
>
>       tempConsumer = xmlConsumer;
>       xmlConsumer = mySaxConsumer;
>
>    }
>
>
>       public void endDocument() throws SAXException {
>               
>               super.endDocument();
>               content = mySaxConsumer.toString();
>               xmlConsumer = tempConsumer;
>               
>               content = myTransform(content);
>               
>               StringXMLizable xmlStr = new StringXMLizable(content);
>
>               xmlStr.toSAX(contentHandler);
>                 
>       }
>
>  }
>   
I've never used SaxBuffer so I can't tell you if you use it correctly but I 
believe so. You should set your own consumer calling setConsumer method (take 
look on it to see why).
The rest seems to look ok. The best way is to try it and eventually debug.

--
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to