cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: Bug 17763 (comments from external DTD cause serializer problems) solution
Date Thu, 01 May 2003 09:03:54 GMT
On Thu, 2003-05-01 at 09:19, Bruno Dumon wrote:
> On Thu, 2003-05-01 at 00:45, Marc Portier wrote:
> > Bruno Dumon wrote:
> > > On Wed, 2003-04-30 at 18:15, Vadim Gritsenko wrote:
> > > 
> > >>Bruno Dumon wrote:
> > >>
> > >>
> > >>>[...] As a solution, I propose we throw all events between
> > >>>start/endDTD away in the avalon parser component.
> > >>>
> > >>
> > >>Should this be configurable behavior - is there a usecase to have these

> > >>events in the pipeline?
> > > 
> > > 
> > > I can't think of one.
> > > 
> > 
> > me neither, yet still, it might be a good idea to just document 
> > this quite well, AND maybe add a log at info level stating this
> > 
> > This keeps on being a very arbitrary choice, so given the 
> > principle of least astonishment adding enough warings about this 
> > here and there should be the least we can do
> > 
> > although my biggest astonishment would come from someone that 
> > actually has an app relying on this.
> > 
> > For that manner (and while at it): "why not make it configurable 
> > to even do away with all comments at the start?"  The only ones I 
> > see usefull to keep are in fact the ones that get inserted in 
> > mid-pipe (transformer) by some xslt for debugging purposes...
> 
> ok, I'll make it configurable (since JaxpParser is already
> parameterizable, it's a trivial thing to do). I don't think I'll bother
> to add a drop-all-comments feature though.

And suddenly I find myself changing my mind again. I'm now thinking of
dropping these comments in the serializer instead of the parser (but
also make it configurable).

The reasoning being that the fact that we don't want comments in the
output is after all a serializer decission. And SAX parsers are required
to output DTD comments if they read the DTD, so I'd be rather strange if
we change that behaviour.

But knowing myself, on average I change my mind 3 times, so I can
already determine what will be the final decission :-)

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message