cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: Emitting SAX events
Date Fri, 18 Oct 2002 11:38:23 GMT
> From: simo kauranen [mailto:slkauranen@yahoo.com] 
> 
> Thanks for the tip. Now the transformer forwards all
> tags ok, but not the contents of them. And for some
> reason xml-serializer don't like what it gets saying:

To forward the contents of the tags you should call the super.characters()
method if you override it too. Otherwise, something's wrong in your code.

> 
> XML document must have a top level element. 

Are overriding all ContentHandler methods or only part of them? Do you call
super.*** for every one?

> 
> This allthough the forwarded SAX events when written
> in a file form a valid xml file.

Can't help more, sorry. You should check your own code for errors or missing
super.*** calls.

--
  Konstantin

> 
> S.K.
> 
>  --- Piroumian Konstantin <KPiroumian@protek.com>
> wrote: > > From: simo kauranen
> [mailto:slkauranen@yahoo.com] 
> > > 
> > > I have a transformer which writes the incoming
> > > document to disk. Does anyone happen to know how I
> > > could forward the SAX events after writing down
> > the
> > > pipeline? AbstractSAXTransformer has some send
> > methods
> > > but how to use them? Now my code looks like this:
> > > 
> > > ...
> > > public void startDocument(){
> > > 
> > >       writeToDisk("<?xml version=\"1.0\"
> > > encoding=\"ISO-8859-1\"?>"); 		
> > 
> >        super.startDocument();
> > 
> > > }
> > > 
> > > public void startElement(...) {
> > >       writeToDisk(...);
> > 
> >        super.startElement(...);
> > 
> > > }
> > > 
> > > public void endElement(...) {
> > >       writeToDisk(...);
> > 
> >        super.endElement(...);
> > 
> > > }
> > 
> > Btw, the SourceWritingTransformer does something
> > like this already.
> > 
> > --
> >   Konstantin
> > 
> > > 
> > > 
> > > Simo K.
> > > 
> > > 
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Everything you'll ever need on one web page
> > > from News and Sport to Email and Music Charts
> > http://uk.my.yahoo.com
> > > 
> > >
> >
> ---------------------------------------------------------------------
> > > Please check that your question  has not already
> > been answered in the
> > > FAQ before posting.    
> > <http://xml.apache.org/cocoon/faq/index.html>
> > > 
> > > To unsubscribe, e-mail:    
> > <cocoon-users-unsubscribe@xml.apache.org>
> > > For additional commands, e-mail:
> > <cocoon-users-help@xml.apache.org>
> > > 
> > 
> >
> ---------------------------------------------------------------------
> > Please check that your question  has not already
> > been answered in the
> > FAQ before posting.    
> > <http://xml.apache.org/cocoon/faq/index.html>
> > 
> > To unsubscribe, e-mail:    
> > <cocoon-users-unsubscribe@xml.apache.org>
> > For additional commands, e-mail:
> > <cocoon-users-help@xml.apache.org>
> >  
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts http://uk.my.yahoo.com
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message