cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: [Bug] Default-reader depends on JTidy!!!
Date Thu, 08 May 2003 16:58:54 GMT
> From: Nicola Ken Barozzi [mailto:nicolaken@apache.org]
> 
> Carsten Ziegeler wrote, On 08/05/2003 16.26:
> 
> > Steven Noels wrote:
> > 
> >>Honestly, I feel non-obvious, hidden 'convenience behaviour' like this 
> >>to be rather awkward. The fact it is located in such an essential part 
> >>of our code without much evidence of it worries me a bit.
> > 
> > I don't think it's hidden behaviour - it's a contract of the interface:
> > the interface says "whatever you give me, I'll try to generate 
> SAX events
> > out of it".
> > Removing the interface would change the contract to "If you give me
> > XML I'll generate SAX events out of it".
> 
> Well, AFAIS the conract (of the Source) should be something like:
> 
>   - if the source is XML, give me SAX
>   - if the source is not XML, give me a Stream
> 
Yes, absolutely - and the xmlizer has nothing to do with a Source!

> What becomes a problem is only this:
> 
>   - if you can make the source in XML, give me SAX
> 
> This is not a "source"==locator but a generator.
> 
The above mentioned toSAX() method is not in the excalibur source
resolving package. It's simply a convenience method in Cocoon,
that a) first asks the source if it can give SAX and only if not
then b) gets the stream and feeds this stream into the xmlizer
together with the mime-type of the Source. And the xmlizer does
the rest.

Carsten

Mime
View raw message